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
2020-06-05Use histograms instead of gaguesJaime Martinez
Removed test assertion for metric as histograms are not collectors so we can't really test it. Left the test though as it's still valuable.
2020-06-04Add serving time metric for all filesJaime Martinez
2020-06-01Enable the remaining lintersJaime Martinez
- ineffassign - misspell - structcheck - typecheck - unconvert - unused - varcheck - whitespace
2020-06-01Enable deadcode linterJaime Martinez
2020-05-28Add .golangci.yml linter configurationJaime Martinez
As part of https://gitlab.com/gitlab-org/gitlab-pages/-/issues/385 we have introduced the use of a custom `.golangci.yml` file with some custom rules for linting. This replaces the need of downloading and using `golint`, `gofmt` `go vet` and `gocyclo` manually. We take advantage of the custom `golangci-lint` docker image as stated in the [Automatic lintinb] (https://docs.gitlab.com/ee/development/go_guide/#automatic-linting) section of the Go standards and style guidelines. This iteration enables a subset of linters, with the remaining of them enabled on a separate MR as described in the issue above. The main changes introduced by this linter include: - gosec: potential hardcoded credentials - goconst: DRY by declaring and using constants - gosimple: reduce statements complexity and improve return statements
2020-05-07go fmtIgor Wiedler
2020-05-07Merge remote-tracking branch 'origin/master' into update-labkitIgor Wiedler
2020-05-04Add a prometheus counter for GitLab API call failuresGrzegorz Bizon
2020-04-28add newline to /readiness success responseIgor Wiedler
2020-04-27app is in main package, no need to pass VERSION throughIgor Wiedler
2020-04-27use labkit monitoring.Start() to get auto pprof on metrics portIgor Wiedler
2020-02-28Extract health check in its own middlewareKrasimir Angelov
This way we short-circuit health check requests and avoid doing domain lookup for them. We also do not report them in exported Prometheus metrics and this way avoid trigger alerts during deploys. Related to: * https://gitlab.com/gitlab-org/gitlab-pages/issues/350 * https://gitlab.com/gitlab-com/gl-infra/production/issues/1681
2020-02-19Remove request.WithHTTPSFlag and set directly in testsJaime Martinez
2020-02-03use gorilla/handlers.ProxyHeaders to get the X-Forwarded-* headers and set ↵Jaime Martinez
them in the appropriate http.Request fields
2019-12-08Add support for the port component in the Host headerGrzegorz Bizon
2019-12-04Improve error reporting in the main packageGrzegorz Bizon
2019-12-02Improve error handing when creating new domains config sourceGrzegorz Bizon
2019-11-25Make it possible to pass client config to gitlab sourceGrzegorz Bizon
2019-11-24Respond with 502 if a domain can not be retrieved from a sourceGrzegorz Bizon
2019-11-23Implement a transitional domains sourceGrzegorz Bizon
2019-11-23Add note about transitional domain source interfaceGrzegorz Bizon
2019-10-07Remove unused Admin gRPC APIKrasimir Angelov
It was ever used. See gitlab-org/omnibus-gitlab/merge_requests/3444#note_194217889 for more details. Done as part of https://gitlab.com/gitlab-org/gitlab/issues/28781.
2019-10-02Merge branch 'master' into backstage/gb/domain-serving-refactoringGrzegorz Bizon
2019-10-02Merge branch 'backstage/gb/separate-domain-source-storage' into 'master'Nick Thomas
Separate domain config source See merge request gitlab-org/gitlab-pages!188
2019-10-01Remove references to `Project`Kamil Trzciński
Always uses `LookupPath`. The `project` is local to `source/disk`.
2019-09-27Create a factory method for Domains to handle mutex betterGrzegorz Bizon
2019-09-27Create a factory method for Domains to handle mutex betterGrzegorz Bizon
2019-09-26Add support for previewing artifacts that are not publicTuomo Ala-Vannesluoma
Remove some duplicate logic on Auth module Separate handling artifact to own handlers package Unit test handlers by mocking auth and artifact modules Add generate-mock step to Makefile Use additional handler func to simplify TryMakeRequest return type Always try with token if exists Do not log RequestURI, log path only Remove not used logRequest func
2019-09-24Remove refactoring support comments and improve app.goGrzegorz Bizon
2019-09-24Encapsulate groups config in the source packageGrzegorz Bizon
2019-09-22Separate domain config source from a domainGrzegorz Bizon
2019-09-13Rename confusing domain struct from D to DomainGrzegorz Bizon
2019-08-30Refactoring to reduce cyclometric complexityAndrew Newdigate
2019-08-30Add full HTTP metrics and logging to GitLab pages using LabKitAndrew Newdigate
2019-08-22Refactor to use pluggable http.Handler middlewaresan-use-middleware-handlersAndrew Newdigate
2019-08-21Fix https downgrade for pages behind proxyVladimir Shushlin
We can't rely on r.TLS when pages are served behind proxy So we save https flag to a context for later usage Right now I'm trying to keep changes to a minimum since I'm planning to backport this to older versions That's why https flag is not refactored throughout the codebase The alternative way would be to use gorilla's proxy headers I'm planning to refactor to that version later
2019-08-08Use simplified Prometheus handler func.Ben Kochie
2019-07-12feat: add flag to define custom response headersMax Wittig
2019-07-10Revert "chore: vendor complete dependency tree"Max Wittig
This reverts commit 27bd4d83cade6a721330e8583874e7c715bf3a26.
2019-06-03Redirect unknown ACME challenges to the GitLab instanceVladimir Shushlin
2019-05-28Add config flags to specify TLS versionsKrasimir Angelov
Introduce two new configuration options -tls-min-version and -tls-max-version to control which TLS versions will be supported by the server. Accepted values are ssl3, tls1.0, tls1.1, tls1.2, and tls1.3. Closing https://gitlab.com/gitlab-org/gitlab-pages/issues/187
2019-05-16Disable 3DES and other insecure cipher suitesKrasimir Angelov
Supported cipher suites: tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 Closes https://gitlab.com/gitlab-org/gitlab-pages/issues/150.
2019-04-02Prepare pages auth logs for production rolloutVladimir Shushlin
Mostly escalate log levels Add new logs and fields to existing logs
2018-10-26Allow the maximum connection concurrency to be specifiedNick Thomas
2018-10-02Fix comparing the domain and log request information as well. Removed ↵Tuomo Ala-Vannesluoma
invalid comment and fixed one else case.
2018-09-30Fix returning and calling functionTuomo Ala-Vannesluoma
2018-09-22Add special handling for namespace projects to avoid existence leakTuomo Ala-Vannesluoma
2018-09-10Fix handling the projects with not updated configurationTuomo Ala-Vannesluoma
2018-08-18Add missing return callTuomo Ala-Vannesluoma
2018-08-10Allow auth proxying only for configured domains and everything under pages ↵Tuomo Ala-Vannesluoma
domain