Age | Commit message (Collapse) | Author |
|
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.
|
|
Fix support for archives without directory structure
Closes #482
See merge request gitlab-org/gitlab-pages!373
|
|
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
```
|
|
Avoid strange EOF error when the encoding is wrong
|
|
|
|
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
|
|
|
|
|
|
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
|
|
Fix https://gitlab.com/gitlab-org/gitlab-pages/-/issues/24
|
|
use correct reference
|
|
Simplify responsibilities of auth package and reduce
complexity of app.go deciding which content to serve.
|
|
Add acceptance test and some more domains for testing
Move namespace domain serving logic
Restore go.sum
Remove redundant return
Fix linter
|
|
|
|
This will allow namespace domains to serve custom 404.html files
for public projects. This change adds a check to check for permision
only if it's serving a namespace domain with access controls enabled.
|
|
|
|
Update code and tests to handle the fact thet API will always return
prefix surrounded with slashes (e.g. `/prefix/`) and source.path with
trailing slash (e.g. `path/to/public/`).
|
|
|
|
|
|
|
|
|
|
|
|
pages for subgroups
Closes gitlab-ce#30548
See merge request gitlab-org/gitlab-pages!123
|
|
|
|
This prevents false content-type detection based on the file contents, when they are gzipped.
Closes #181
|
|
|
|
|
|
|
|
|
|
|
|
add support for custom domains for which auth is proxied via gitlab pages domain
|
|
|
|
|
|
|
|
|
|
HTTPS-only pages
See merge request gitlab-org/gitlab-pages!50
|
|
|
|
- Check `config.json` for `httpsonly` attribute
- Store value against custom domain or group/project pair
- Respond with 301 redirect to HTTP requests to these domains/projects
Re: https://gitlab.com/gitlab-org/gitlab-ce/issues/28857
|
|
|
|
|
|
|
|
Without this patch, the different domains end up with pointers to the same
domainsConfig struct, as go re-uses the same region of memory on each iteration
of a for loop.
|
|
|
|
|
|
|
|
|