Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
AgeCommit message (Collapse)Author
2021-12-07refactor: enable unparam in .golangci.ymlVladimir Shushlin
and fix offences
2021-12-01Merge branch 'refactor/limiter-new' into 'master'Jaime Martinez
refactor: make internal/lru and internal/ratelimiter metrics optional Closes #647 See merge request gitlab-org/gitlab-pages!606
2021-12-01chore: update method namesfeistel
2021-11-25refactor: add functional option to customize lru cache size and expirationfeistel
don't expose default values and keep them private.
2021-11-11fix: reject requests with very long URIsVladimir Shushlin
Some parts of the application may be vulnerable to very long URIs being passed. E.g. Auth will try to save URI to session cookie, and it will fails, which will result in 500 error Changelog: fixed
2021-11-01refactor: make internal/lru and internal/ratelimiter metrics optionalfeistel
2021-10-25refactor: remove domain from requestJaime Martinez
2021-10-14feat: add panic handler middlewareJaime Martinez
Changelog: added
2021-10-14refactor: pass metrics as paramsJaime Martinez
2021-10-14refactor: remove WithProxied settingJaime Martinez
2021-10-14feat: add source IP ratelimiter middlewareJaime Martinez
It gets the source IP from `r.RemoteAddr` or from the `X-Forwarded-For` header for proxied requests (when `--listen-proxy` is enabled). The first iteration will only report logs and metrics when an IP is being rate limited. The rate limiter uses a Token Bucket approach using golang.org/x/time/rate, which can be configured with the newly added flags `rate-limit-source-ip` and `rate-limit-source-ip-burst`. To enable the rate limiter, set `rate-limit-source-ip` to value > 1, which is the number of requests per second to allow. It is enabled by default in "dry-run" mode so requests won't be dropped until the environment variable `FF_ENABLE_RATE_LIMITER` is set to `"true"`. See metrics.go for the newly added metrics. Changelog: added
2021-09-28chore: fix compile errorfeistel
2021-09-28refactor: move acl to auth package and update function signaturefeistel
2021-09-16refactor: move middlewares to corresponding packagesfeistel
2021-08-26refactor: change source field type to source.SourceJaime Martinez
2021-08-26refactor: remove internal/source/domains packagefeistel
2021-08-20refactor: remove IsReady from the Source interface as this is always truefeistel
2021-08-20refactor: remove support for disk configuration sourcefeistel
Changelog: removed
2021-08-09feat: add CORS header to HEAD requestsfeistel
Changelog: changed
2021-07-22Use internal-gitlab-server in auth-related tasksfeistel
Update the auth package to use the internal server when fetching access token or checking for authentication. Changelog: changed
2021-07-08Update test mocksJaime Martinez
2021-07-07Add correlation_id to outbound requestsJaime Martinez
2021-07-07Improve logging and correlation IDJaime Martinez
2021-06-22Apply 2 suggestion(s) to 1 file(s)Vladimir Shushlin
2021-06-21Use stub in acme_test.goJaime Martinez
2021-05-31make listernerConfig bigger and pass it as the only argument to ↵feistel
listendAndServe as a function
2021-05-25Clean up listenAndServe functions by turning them into methodsfeistel
2021-05-13Remove HasLookupPath and address feedbackJaime Martinez
2021-05-12Log details on failureJaime Martinez
2021-05-11Fail if disk is disabledJaime Martinez
Return disk disabled error Remove useLegacyStorage leftovers Fix run process
2021-05-05Merge branch 'improve/config-error' into 'master'Jaime Martinez
Add a domain context to domain config retrieval error Closes #506 See merge request gitlab-org/gitlab-pages!468
2021-05-04Apply 1 suggestion(s) to 1 file(s)Jaime Martinez
2021-04-29Use config package in GitLab clientJaime Martinez
Uses the `internal/config/` client inside the `internal/source/gitlab/` package which makes it easier to extend the configuration. This is an iteration of https://gitlab.com/gitlab-org/gitlab-pages/-/issues/543. Changelog: other
2021-04-24Add a domain context to domain config retrieval errorfeistel
2021-03-16Pass metrics into limiter to better decouple the instrumentationIgor Wiedler
2021-03-08Set max-conns to 0 by default, making concurrency limit opt-inmax-conns-default-zeroIgor Wiedler
2021-03-04Move tlsconfig package to be a nested package under configBalasankar "Balu" C
Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
2021-03-01Pass address of Config to app class and make the config field explicitBalasankar "Balu" C
Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
2021-03-01Move configuration parsing to Config packageBalasankar "Balu" C
Changelog: changed Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
2021-02-24fix: use correlationID middlewareErcan Ucan
As discussed within https://gitlab.com/gitlab-org/gitlab-pages/-/issues/510 this MR adds the usage of labkit's correlationID middleware. It uses a similar approach to the implemantion in gitlab-workhorse. Fixes https://gitlab.com/gitlab-org/gitlab-pages/-/issues/510 :tools: with :heart: at Siemens Changelog: fixed
2021-02-15fix(auth): make authentication scope for Pages configurableErcan Ucan
This MR makes required authentication permission scope for Pages configurable. By default, Pages will use `api` scope to authenticate with Pages Application registered on GitLab. With this MR, the scope is configurable and can be set to `read_api` by providing the `auth-scope` variable in the arguments or in the `gitlab-pages.conf` /label ~security Changelog: added
2021-02-08Refactor http client usage in httprageJaime Martinez
Moves the http.Client initialization inside the `httprange` package to the zip VFS. This makes the type `Resource` depend on an http.Client that needs to be passed on initialization. It also makes the zip VFS initialize the client. It's possible to reconfigure it to register a file protocol by calling vfs.Reconfigure explicitly.
2021-01-20Simplify domain and resolver checksJaime Martinez
Return domain not found Returns ErrDomainDoesNotExist when the lookup path cannot be found for a specific project. Closes https://gitlab.com/gitlab-org/gitlab-pages/issues/353 Return ErrDomainDoesNotExist in group resolver
2021-01-20Add more test cases for resolver errorsJaime Martinez
Fix imports and enable test
2021-01-14Move error to domain packageJaime Martinez
Define ErrDomainDoesNotExist in the domain package so it can be returned by the Resolver and handled appropriatley.
2020-12-22Reject all unknown http methodsVladimir Shushlin
2020-12-17Encrypt and sign OAuth codeJaime Martinez
Add AES GCM encryption/decryption to auth Add signing key to Auth Abstract key generation and Auth init to their own funcs. Cleanup and DRY unit tests. Use same code parameter in auth redirect Cleanup auth and add tests for enc/dec oauth code Add acceptance test for fix Apply suggestion from review Add missing test and apply feedback Fix unit test Simplify acceptance test
2020-12-15Fix redirect loop with PROXYv2proxyv2-fix-redirectIgor Wiedler
2020-11-30Remove default configJaime Martinez
Add todo to reconfigure other vfs
2020-11-30Call reconfigure explicitlyJaime Martinez