Commit graph

23 commits

Author SHA1 Message Date
7e80ade24b Add config file and rework cli parsing and passing of config values (#263)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #263 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: crapStone <me@crapstone.dev> Co-committed-by: crapStone <me@crapstone.dev>
2024-02-15 16:08:29 +00:00
974229681f Initial redirects implementation (#148)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Adds basic support for `_redirects` files. It supports a subset of what IPFS supports: https://docs.ipfs.tech/how-to/websites-on-ipfs/redirects-and-custom-404s/ Example: ``` /redirect https://example.com/ 301 /another-redirect /page 301 /302 https://example.com/ 302 /app/* /index.html 200 /articles/* /posts/:splat 301 ``` 301 redirect: https://video-prize-ranch.localhost.mock.directory:4430/redirect SPA rewrite: https://video-prize-ranch.localhost.mock.directory:4430/app/path/path Catch-all with splat: https://video-prize-ranch.localhost.mock.directory:4430/articles/path/path Closes #46 Co-authored-by: video-prize-ranch <cb.8a3w5@simplelogin.co> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #148 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: video-prize-ranch <video-prize-ranch@noreply.codeberg.org> Co-committed-by: video-prize-ranch <video-prize-ranch@noreply.codeberg.org>
2023-03-30 21:36:31 +00:00
26d59b71f0 Fix typo in integration test log (#210)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
I forgot to update the name of this function in the CI log so it looks like it's running the same test twice even though it's not. Co-authored-by: crystal <crystal@noreply.codeberg.org> Reviewed-on: #210 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Crystal <crystal@noreply.codeberg.org> Co-committed-by: Crystal <crystal@noreply.codeberg.org>
2023-03-20 22:52:42 +00:00
c9050e5722 Handle Relative Symlinks (#205)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
enhance #114 Reviewed-on: #205
2023-03-11 05:07:17 +00:00
42d5802b9b Allow to define default branches (#125)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This try to address #115 Co-authored-by: Simon Vieille <simon@deblan.fr> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #125 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: deblan <deblan@noreply.codeberg.org> Co-committed-by: deblan <deblan@noreply.codeberg.org>
2023-02-14 03:03:00 +00:00
0adac9a5b1 fix http -> https redirect and add integration tests for it (#184)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
and more logging Reviewed-on: #184
2023-02-14 02:23:28 +00:00
46316f9e2f Fix raw domain for branches with custom domains and index.html (#159)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix #156 fix #157 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #159 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: crystal <crystal@noreply.codeberg.org> Co-committed-by: crystal <crystal@noreply.codeberg.org>
2023-02-11 03:12:42 +00:00
272c7ca76f Fix xorm regressions by handle wildcard certs correctly (#177)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
close #176 Reviewed-on: #177
2023-02-11 01:26:21 +00:00
7b35a192bf Add cert store option based on sqlite3, mysql & postgres (#173)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Deprecate **pogreb**! close #169 Reviewed-on: #173
2023-02-10 03:00:14 +00:00
2c2087953d Add Integration test for custom domain redirect to another custom domain (#172)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
address #155 Reviewed-on: #172
2023-02-09 17:30:06 +00:00
bd538abd37 Fix wrong redirect on custom domain with path (#154)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
closes #153 Co-authored-by: crapStone <crapstone01@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #154 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: crapStone <crapstone@noreply.codeberg.org> Co-committed-by: crapStone <crapstone@noreply.codeberg.org>
2023-01-11 00:00:37 +00:00
f7fad2a5ae Integration Tests use https://codeberg.org/cb_pages_tests
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
2023-01-04 06:08:06 +01:00
f2f943c0d8 Remove unnecessary conversion (#139)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- Remove unnecessary type conversion. - Enforce via CI Co-authored-by: Gusted <williamzijl7@hotmail.com> Reviewed-on: #139 Reviewed-by: 6543 <6543@obermui.de> Co-authored-by: Gusted <gusted@noreply.codeberg.org> Co-committed-by: Gusted <gusted@noreply.codeberg.org>
2022-11-15 16:15:11 +01:00
b9966487f6 switch to std http implementation instead of fasthttp (#106)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
close #100 close #109 close #113 close #28 close #63 Reviewed-on: #106
2022-11-12 20:37:20 +01:00
dc41a4caf4 Add Support to Follow Symlinks and LFS (#114)
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
close #79 close #80 close #91 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #114
2022-08-12 06:40:12 +02:00
876a53d9a2 Improve logging (#116)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Actually log useful information at their respective log level. - Add logs in hot-paths to be able to deep-dive and debug specific requests (see server/handler.go) - Add more information to existing fields(e.g. the host that the user is visiting, this was noted by @fnetX). Co-authored-by: Gusted <williamzijl7@hotmail.com> Reviewed-on: #116 Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: Gusted <gusted@noreply.codeberg.org> Co-committed-by: Gusted <gusted@noreply.codeberg.org>
2022-08-12 05:06:26 +02:00
5411c96ef3 Tell fasthttp to not set "Content-Length: 0" on non cached content (#107)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix #97 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #107
2022-07-15 21:06:05 +02:00
9076bc3f75 Support access branch that contains slash character (#102)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
So we can access branch that contain slash like `branch/name` with `username.codeberg.page/repo/@branch~name/`. Branch name cannot contain `~` character but it can be in a HTTP URL, so replace the `~` from URL to `/` could be a valid solution to me. Resolve #101 Co-authored-by: Gary Wang <wzc782970009@gmail.com> Reviewed-on: #102 Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: Gary Wang <blumia@noreply.codeberg.org> Co-committed-by: Gary Wang <blumia@noreply.codeberg.org>
2022-07-08 13:39:24 +02:00
6dedd55eb3 Release via CI (#94)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
* release via CI * general CI improvements close #76, close #92 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #94
2022-06-14 20:35:11 +02:00
4c6164ef05 Propagate ETag from gitea (#93)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
close #15 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #93
2022-06-14 18:23:34 +02:00
913f762eb0 Add integration test for custom domain (#90)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
and some nits --- close #89 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #90
2022-06-13 14:43:49 +02:00
38fb28f84f implement custom 404 pages (#81)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
solves #56. - The expected filename is `404.html`, like GitHub Pages - Each repo/branch can have one `404.html` file at it's root - If a repo does not have a `pages` branch, the 404.html file from the `pages` repository is used - You get status code 404 (unless you request /404.html which returns 200) - The error page is cached --- close #56 Reviewed-on: #81 Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: crystal <crystal@noreply.codeberg.org> Co-committed-by: crystal <crystal@noreply.codeberg.org>
2022-06-12 03:50:00 +02:00
35b35c5d67 Add integration tests (#86)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
close #82 close #32 make sure we dont get regressions again ... as we currently have in **main** followups: - create a DNS subdomayn specific to redirect to mock url ... Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: #86 Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
2022-06-11 23:17:43 +02:00