* Working tests
* More tests, a bugfix (yay tests) and docs
* Changed filter description adding v prefix to versions
* Updated docs to be more precise
* More robust, changed docs
* Fixed copy paste bug
* extend filtering logic and configuration to include version lists
Module filtering is very useful, but many deployments will need to
satisfy even more granular constrainsts. Enterprises may need
approved lists specific down to the minor (or patch) version element.
Version filtering logic is similar to the module filtering, in that
it's a prefix match of the version requested against each entry in the
version filter list.
Closes#1045
* include version filtering in documentation with example
* allow filtering when version is missing
Endpoints that do not specify a version, such as "@v/list", only need
to be filtered by module rules.
* When the filter file is missing throw a fatal
* Ignore path when file is not specified
* Fix build failure on ci
* Remove logs
* Fix propagate and handle errors
* Fix build error
* Actually check filter file
* Check for errors in the test suite as well
* Improve test coverage
* Add more tests
* Simplify NewFilter function
* Make file format rules pretty stringent
* Fix test failure
* Show line numbers on errors as well
* Fix typo
* Fix typo again
* When the filter file is missing throw a fatal
* Ignore path when file is not specified
* Fix build failure on ci
* Remove logs
* Fix propagate and handle errors
* Fix build error
* Actually check filter file
* Check for errors in the test suite as well
* Improve test coverage
* Add more tests
* Simplify NewFilter function
* Address review comments
* switch proxy to config file
pull in single flight changes
* changes for single-flight
* intermediate stage. All tests passing. pkg still has env refs
* remove all env references
* delete config/env entirely
* fix failing tests
* create the config.toml file as part of dev setup
* create config file only if it doesn't exist
* update Dockerfiles to use config file
* move composing elements to the top
* verbose parameter naming
* newline
* add flag for config file path
* update docs with config file flag
* remove unnecessary nil check
* use filepath.join
* rename redis port to address
* fix path.join
* fix issues after merge
* add vendor dir
* Added filter for private repos. Non private repos get redirected to
olympus
* Changed filter to allow private modules
* Changed config file name function
* Added filter tests
* The middleware returns 200 for privates, redirects public, 404 for
disabled repos
* Removed printf
* Removed forgotten printf
* Removed logger from the middleware func, not used anymore
* Removed unused (uncommented) function
* Replaced 404 with 403 in case of banned modules
* Fixed test path / cleaned olympus endpoint suffix
* Added error operation to GetVersion
* Moved filter test in custom file, reverted injection of the filter into
the app
* Removed white line
* Clarified comment for ignoring getversion error
* Added todo comment to fill the cache and serve the request with the
cache
* Added error handling to filter
* Removed commented early version of the test