Commit Graph

233 Commits

Author SHA1 Message Date
6543
de439f9bec wrap cert db and make sync gracefull 2021-12-05 18:20:36 +01:00
6543
11fa729686 mv acme config setup into own func 2021-12-05 16:33:56 +01:00
6543
77e39b2213 unexport if posible 2021-12-05 16:24:26 +01:00
6543
e6198e4ddd start refactor Upstream func 2021-12-05 15:59:43 +01:00
6543
de4706bf58 rm 2rm 2021-12-05 15:53:46 +01:00
6543
76c867cfca move "http acme server setup" into own func 2021-12-05 15:45:22 +01:00
6543
b6c4c63fb4 own file 2021-12-05 15:25:12 +01:00
6543
ccada3e6df split cert func to related packages 2021-12-05 15:21:05 +01:00
6543
bb6f28fe57 move setup of fastServer into own func 2021-12-05 15:09:21 +01:00
6543
b3830e979c inject all cache 2021-12-05 15:02:44 +01:00
6543
2b49039252 add todo 2021-12-05 14:48:56 +01:00
6543
b28204a468 acme-api -> acme-api-endpoint 2021-12-05 14:48:55 +01:00
6543
97d4ea9d6b main-domain-suffix -> pages-domain 2021-12-05 14:48:54 +01:00
6543
fdd04610e5 fix .domains and make it redable 2021-12-05 14:48:53 +01:00
6543
5b2e91a37a REDIRECT_RAW_INFO -> RAW_INFO_PAGE 2021-12-05 14:48:52 +01:00
6543
38426c26db move upstream into own package 2021-12-05 14:48:52 +01:00
6543
f35c4d0f66 make mem cache an interface and inject 2021-12-05 14:48:51 +01:00
6543
0bc38b668f db Sync on exit 2021-12-05 14:48:50 +01:00
6543
5ca5020cfa open key-database deterministic 2021-12-05 14:48:49 +01:00
6543
796f24262e fix code format 2021-12-05 14:48:48 +01:00
6543
690879440a move helper func in related packages 2021-12-05 14:48:47 +01:00
6543
5b81a8b8bc remove os.Getenv() usage 2021-12-05 14:48:46 +01:00
6543
35e08d2252 remove EnvOr use flags 2021-12-05 14:48:45 +01:00
6543
ac93a5661c start using urfave/cli 2021-12-05 14:48:44 +01:00
6543
bdc2d0c259 dont access global vars inject them 2021-12-05 14:48:41 +01:00
6543
fb5726bd20 use zerolog instead of own logger 2021-12-05 14:48:40 +01:00
Moritz Marquardt
76e5d8e77c Add TODOs 2021-12-05 14:48:37 +01:00
Moritz Marquardt
2e970dbcda Merge pull request 'Fix github-style non-.html URLs repeating the path twice' (#23) from bugfix/github-style-nohtml-paths into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/23
2021-12-05 13:56:01 +01:00
Moritz Marquardt
51c79f512d Fix github-style non-.html URLs repeating the path twice
Issue was reported in https://codeberg.org/Codeberg/Community/issues/547#issuecomment-285075
2021-12-04 13:54:18 +01:00
Moritz Marquardt
38938e884d Merge pull request 'Add redirect for GitHub-style non-".html" paths & force remove index.html suffix' (#13) from feature/github-style-nohtml-paths into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/13
v2.3
2021-12-02 20:35:43 +01:00
Moritz Marquardt
57dce3b0c5 Add redirect for GitHub-style non-".html" paths & force remove index.html suffix
See https://codeberg.org/Codeberg/Community/issues/547 for more info
2021-12-02 20:35:43 +01:00
Moritz Marquardt
026a04e57e Merge pull request 'Change browser cache to 10 minutes to make bigger pages more performant' (#14) from feature/browser-side-caching into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/14
2021-12-02 20:35:33 +01:00
Moritz Marquardt
b6d7f5a6ee Change browser cache to 10 minutes to make bigger pages more performant 2021-12-02 20:35:33 +01:00
Moritz Marquardt
726d8321e8 Merge pull request 'Fix (half) empty cache issue' (#17) from bugfix/large-files-are-empty into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/17
2021-12-02 20:35:22 +01:00
Moritz Marquardt
989d00832f Fix (half) empty cache issue 2021-12-02 19:11:13 +01:00
Moritz Marquardt
26dd1591f6 Add www redirect for main domain v2.2 2021-12-02 00:00:00 +01:00
Moritz Marquardt
a48ba8ee49 Run gofmt 2021-12-01 22:59:52 +01:00
Moritz Marquardt
fedfa8def4 Remove REDIRECT_BROKEN_DNS page and instead use "Failed Dependency" error 2021-12-01 22:59:38 +01:00
Moritz Marquardt
6c85b8a166 Merge pull request 'Handle certificate errors with mock certificates (fixes #10)' (#12) from feature/certificate-error-handling into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/12
2021-12-01 22:53:33 +01:00
Moritz Marquardt
544b3f7321 (Ab)use CSR field to store try-again date for renewals (instead of showing a mock cert), must be tested when the first renewals are due 2021-12-01 22:49:48 +01:00
Moritz Marquardt
f29ebc57d3 Handle certificate errors with mock certificates (fixes #10) 2021-12-01 21:46:52 +01:00
Moritz Marquardt
5b6e3748b4 Merge pull request 'Pass Gitea API token to requests' (#9) from fnetX/codeberg-pages-server:main into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/9
2021-12-01 21:46:28 +01:00
Moritz Marquardt
6d520c2a40 Update error message for private repo access 2021-12-01 21:44:54 +01:00
fnetx
73da80adc1 Switch GiteaApiToken from byte to string 2021-11-26 17:10:31 +01:00
fnetx
455f65216c Remove access token from canonicalLink as per momar 2021-11-26 17:03:58 +01:00
fnetx
772c17e214 Pass Gitea API token to requests
This allows to display repos that aren't fully public. Some users seem
to be very interested in not having their pages viewable, and it might
make even sense to avoid e.g. search engines to read them.
If set to some random user string, this could allow to set the
visibility at least to limited (so only logged users see the repo), and
should allow to view private repos in the future with another API token.
2021-11-26 04:19:24 +01:00
Moritz Marquardt
418dbb7315 Merge pull request 'Refactor Code' (#8) from 6543/codeberg-pages:refactor into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/8
2021-11-25 19:16:20 +01:00
6543
a6da3eb5f0 ignore vendor/ folder 2021-11-25 16:19:04 +01:00
6543
f2bb6aa36f fix comment 2021-11-25 16:18:28 +01:00
6543
e800d2110e gofmt -s -w *.go */*.go 2021-11-25 16:12:28 +01:00