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
AgeCommit message (Collapse)Author
2021-12-08chore: fix lint issueJaime Martinez
2021-12-08fix: use if statement instead of switchJaime Martinez
2021-12-08refactor: handle error outside Root callerJaime Martinez
and pretend to serve content even if the request has been cancelled to prevent making extra operations if this happens early in the request chain. For example, if we know the request was cancelled there is no point in checking the redirects or the custom 404 file handler.
2021-12-08fix(vfs): handle context.Canceled errorsJaime Martinez
As not found resources to reduce the number of 500 errors reported in the logs and Sentry. Closes https://gitlab.com/gitlab-org/gitlab-pages/-/issues/669. Changelog: changed.
2021-12-07chore: upgrade to labkit 1.11.0Jaime Martinez
And report stack trace with error tracking to Sentry. Changelog: other
2021-11-17Merge branch 'fix/native-fs-error' into 'master'Jaime Martinez
refactor: remove vfs.ErrNotExist and switch to go native fs error See merge request gitlab-org/gitlab-pages!569
2021-11-16feat: handle extra headers when serving from compressed zip archivefeistel
Related to https://gitlab.com/gitlab-org/gitlab-pages/-/issues/466 Changelog: added
2021-11-11refactor: remove vfs.ErrNotExist and switch to go native fs errorfeistel
2021-11-08style: uppercase sha256feistel
SHA is an initialism. See https://github.com/golang/go/wiki/CodeReviewComments#initialisms
2021-11-08refactor: read and use file_sha256 as cache key for zip VFSfeistel
Now that the Rails API is serving the archive file_sha256 in the lookup response, we can move away from using the base URL as the key to cache the archive. Changelog: change
2021-09-09refactor: avoid os.Is.. in favor of errors.Isfeistel
2021-09-09refactor: move away from ioutil (deprecated)feistel
2021-09-02refactor: replace magic numbers with http status codesfeistel
2021-08-25chore: process the first 1000 rules onlyJaime Martinez
2021-08-20Splat and placeholder support in _redirectsNathan Friend
This commit adds support for Netlify-style splats (*) and :placeholders in the _redirects file. Changelog: added
2021-05-20Remove serverless code from Pagesfeistel
2021-04-22Follow error strings conventionfeistel
2021-03-01Use actual structs in Config struct instead of pointers to themBalasankar "Balu" C
Signed-off-by: Balasankar "Balu" C <balasankarc@autistici.org>
2021-02-08Add test for file outside allowedPathsJaime Martinez
(cherry picked from commit b519027459919125c5227fcb60519bdd18b4c780)
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-04Fix for query strings being strippedRobert May
This ensures the query string is persisted when redirecting to add a trailing slash.
2020-11-30Remove default configJaime Martinez
Add todo to reconfigure other vfs
2020-11-30Call reconfigure explicitlyJaime Martinez
2020-11-30Add Reconfigure to serving and VFS interfacesJaime Martinez
2020-11-30Use sync.Once instead of checking for nilJaime Martinez
2020-11-30Increase time for flaky testJaime Martinez
Cleanup
2020-11-30Move flag definition to mainJaime Martinez
Add zip config to appConfig
2020-11-30Log zip configJaime Martinez
2020-11-30Move zip flags to configJaime Martinez
2020-11-30Add default configJaime Martinez
Use DefaultConfig as global
2020-11-30Add zip config flagsJaime Martinez
Adds a config package with specific zip configuration structure that can be shared between packages.
2020-10-27Properly handle processing failures with `5xx`Kamil Trzciński
Prior to this change ALL processing failures unrelated to "file missing" would return `404`. This is inaccurate. Processing failures are failure of GitLab Pages and `500` should be returned in such cases.
2020-10-15Merge branch 'fix-zip-directories' into 'master'Vladimir Shushlin
Fix support for archives without directory structure Closes #482 See merge request gitlab-org/gitlab-pages!373
2020-10-13Merge branch 'log-serving-type' into 'master'Vladimir Shushlin
Log serving type Closes #477 See merge request gitlab-org/gitlab-pages!369
2020-10-13Log serving type used for requestslog-serving-typeKamil Trzciński
This extends our structured logging with information about how the given request was served
2020-10-13Fix support for archives without directory structureKamil Trzciński
In case of archives that do not store directories we would fail to automatically serve `index.html` for a `/` type of request. This makes us create directories when traversing the file list. ``` Archive: public-without-dirs.zip Length Date Time Name --------- ---------- ----- ---- 40 2020-09-15 02:47 public/subdir/hello.html 14 2020-09-15 03:35 public/subdir/2bp3Qzs9CCW7cGnxhghdavZ2bJDTzvu2mrj6O8Yqjm3YMRozRZULxBBKzJXCK16GlsvO1GlbCyONf2LTCndJU9cIr5T3PLDN7XnfG00lEmf9DWHPXiAbbi0v8ioSjnoTqdyjELVKuhsGRGxeV9RptLMyGnbpJx1w2uECiUQSHrRVQNuq2xoHLlk30UAmis1EhGXP5kKprzHxuavsKMdT4XRP0d79tie4tjqtfRsP4y60hmNS1vSujrxzhDa 33 2020-09-15 02:47 public/subdir/linked.html 31 2020-09-15 02:47 public/404.html 33 2020-09-15 02:47 public/index.html 258 2020-10-13 12:40 public/bad_symlink.html 18 2020-10-13 12:40 public/symlink.html ```
2020-10-13Ensure the content encoding is correct before reading the bodyfeistel
Avoid strange EOF error when the encoding is wrong
2020-10-07Enable redirects by default24-redirects-by-defaultEric Eastwood
- Part of https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24 - Original feature added in https://gitlab.com/gitlab-org/gitlab-pages/-/merge_requests/336 - Feature was verified working in in production: https://ops.gitlab.net/gitlab-cookbooks/chef-repo/-/merge_requests/4247#note_92527 - Feature toggle docs being removed in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/42759
2020-09-25Simplify after code reviewKamil Trzciński
2020-09-25Apply suggestions from reviewJaime Martinez
2020-09-24Use same metric but with labelsJaime Martinez
2020-09-24Add Name to the VFS interface to use with metricsJaime Martinez
2020-09-24Rebase from base branchJaime Martinez
Add vfs.VFS implementation for zip Fix build errors Clean zip vfs Add tests for Root Add zip serving metric Return a zip.Instance() when source == zip Add simple acceptance test for zip serving Use correct contents No need to start testServer in go routine
2020-09-21Update notes about serving compressed filesJaime Martinez
2020-09-21Apply suggestions from feedbackJaime Martinez
2020-09-21Add zip package that implements vfs.RootJaime Martinez
Adds a zip package capable of reading zip files from an httprange.Resource. It reads archive file contents into memory per archive that is requested from the vfs.Root. WIP: add simple test for archive reader WIP: fix build WIP: update archive test WIP: adding tests for archive WIP: print more info WIP: update zip file correct symlink WIP: use correct file Add bad symlink file to zip Update handling long symlinks update documentation and reorg code fix up stuff
2020-09-15Add support for redirects24-add-redirectsEric Eastwood
Fix https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24
2020-09-09Fix handling of absolute paths for `vfs/local`fix-symlink-specsKamil Trzcinski
This resolves absolute paths to be relative if within a `rootPath` or absolute if outside. The `EvalSymlink` and the later usage of `VFS` will ensure that path is sanitised
2020-09-08Fix `symlink` specs on OSXKamil Trzcinski
The fix is a little unconventional: - we treat the absolute paths as local to `rootPath` - this actually makes sense, given that this VFS should only work in this context
2020-09-03Abstract `VFS` `Root`Kamil Trzciński