Commit graph

135 commits

Author SHA1 Message Date
crystal
81c46cc887 fix authorization header
AuthorizationHeaderToken requires API tokens to be prepended with "token "
2022-06-10 16:09:54 +02:00
6543
c9cfee5477 more logging 2022-06-10 16:02:28 +02:00
6543
98f1880dea Merge branch 'main' into refactor-add-more-logging-and-tests 2022-06-10 15:32:57 +02:00
6543
bb8eb32ee2 make debug messages unique 2022-06-10 15:29:47 +02:00
6543
f2ba7eac64 set golang to 1.18 (#84)
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/84
2022-06-10 15:27:17 +02:00
6543
5c508c5d13 create giteaClient once 2022-06-02 15:57:51 +02:00
6543
0f662157ff Merge remote-tracking branch 'main/main' into refactor-add-more-logging-and-tests 2022-06-02 15:43:18 +02:00
6543
d9127d1ed9 start using "errors" 2022-06-02 15:41:47 +02:00
6543
57076a47d3 Update 'Justfile' 2022-05-30 23:55:37 +02:00
6543
d35e41fa9f
modernize ForbiddenMimeTypes 2022-05-16 00:56:52 +02:00
6543
6234889495
rm tmp 2022-05-16 00:45:24 +02:00
6543
ec7fcca0f5
wip 2022-05-16 00:43:04 +02:00
6543
4f2c94c7d9
start moving 2022-05-15 23:12:13 +02:00
6543
176d4b86c2
Merge branch 'main' into refactor-add-more-logging-and-tests 2022-05-15 22:41:36 +02:00
6543
6f12f2a8e4
fix bug 2022-05-15 22:36:12 +02:00
6543
8d0ab6d8c0
refactor 2022-05-15 22:35:39 +02:00
6543
0742782a0d
ci: add branches filter 2022-05-15 22:10:55 +02:00
6543
4b2df4aac2
Merge branch 'main' into refactor-add-more-logging-and-tests 2022-05-15 22:08:39 +02:00
Moritz Marquardt
b2ca888050 Change MaxConnsPerIP to 0 to fix too many connections from HAProxy (#77)
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/77
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: Moritz Marquardt <momar@noreply.codeberg.org>
Co-committed-by: Moritz Marquardt <momar@noreply.codeberg.org>
2022-05-14 22:29:54 +02:00
6543
1bb6e09e23
fix lint 2022-05-10 20:55:13 +02:00
6543
5ecb63426f
add unittest for mockCert() 2022-05-10 18:26:00 +02:00
6543
0bfc7775fb
more logging 2022-05-10 18:25:59 +02:00
6543
bc3d3befee
make db interface more generic and add memdb 2022-05-10 18:25:59 +02:00
6543
e5af66b2cd
add "fmt" to justfile 2022-05-10 18:25:49 +02:00
6543
2dbc66d052
let golangci-lint have 5m to check 2022-05-10 18:14:28 +02:00
6543
1724d9fb2e
add "lint" to Justfile 2022-05-10 18:13:14 +02:00
6543
4267d54a63 refactor (2) (#34)
move forward with refactoring:
 - initial implementation of a smal "gitea client for fasthttp"
 - move constant into const.go

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/34
Reviewed-by: Otto Richter <otto@codeberg.org>
2022-04-20 23:42:01 +02:00
Otto Richter
a2c5376d9a Fix CORS / add Access-Control-Allow-Origin * to all methods (#69)
The header is not only necessary on the OPTIONS request, but on any method, so I removed the condition.

Serving any workadventure map was broken BTW. We should have tested this :-(

Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/69
Reviewed-by: Andreas Shimokawa <ashimokawa@noreply.codeberg.org>
Co-authored-by: Otto Richter <otto@codeberg.org>
Co-committed-by: Otto Richter <otto@codeberg.org>
2022-04-10 18:11:00 +02:00
6543
1e4dfe2ae8 Fix tests to let CI pass (#66)
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/66
Reviewed-by: Otto Richter <otto@codeberg.org>
2022-03-30 21:31:09 +02:00
6543
f5d0dc7447 Add pipeline (#65)
close #54

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/65
Reviewed-by: Andreas Shimokawa <ashimokawa@noreply.codeberg.org>
2022-03-27 21:54:06 +02:00
Moritz Marquardt
a5504acb0e Fix cert removal command (#50)
The command was using parts from the old os.Args approach and parts from the cli package, and together they didn't work at all. This fixes that and makes the command `pages-server certs remove [domain...]`.

Co-authored-by: Moritz Marquardt <git@momar.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/50
Co-authored-by: Moritz Marquardt <momar@noreply.codeberg.org>
Co-committed-by: Moritz Marquardt <momar@noreply.codeberg.org>
2022-03-20 23:18:00 +01:00
Moritz Marquardt
f5e613bfdb Merge pull request 'Fix certs only being renewed 7 or 30 days *after* they expire instead of before' (#61) from hotfix/expiration into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/61
2022-02-28 21:55:51 +01:00
Moritz Marquardt
cf9e6d9dc6 Fix certs only being renewed 7 or 30 days *after* they expire instead of before
Seems like plus, minus, greater than and less than are the most complex to understand mathematical concepts...
2022-02-28 21:50:13 +01:00
Otto Richter
ac5b19123d Update README (#57)
I hope this makes it more inviting to collaborate with us on this project. I'd like to promote the software a little more.

Co-authored-by: fnetx <git@fralix.ovh>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/57
Co-authored-by: Otto Richter <fnetx@noreply.codeberg.org>
Co-committed-by: Otto Richter <fnetx@noreply.codeberg.org>
2022-02-19 18:10:40 +01:00
fnetx
4404287958
Update 404 Not found page 2022-02-11 01:31:11 +01:00
Moritz Marquardt
e73c79da77 Merge pull request 'Refactor: restructure in packages and dont use golbal vars' (#18) from 6543/codeberg-pages:refactoring into main
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/18
2021-12-10 14:33:18 +01:00
Moritz Marquardt
adfc96ab94
Add --verbose flag and hide debug messages by default 2021-12-10 14:32:14 +01:00
Moritz Marquardt
73fa2da646
Update default to raw.codeberg.page & improve documentation on custom domains 2021-12-10 14:31:58 +01:00
6543
6af6523a0f
code format 2021-12-09 20:16:43 +01:00
6543
70c7065f76
fix #31 2021-12-09 19:32:30 +01:00
6543
aa0638903a
fix argument check and some nits 2021-12-06 16:14:41 +01:00
6543
196482da07
less panic 2021-12-05 23:21:55 +01:00
6543
5aae7c882f
Merge branch 'master' into refactoring 2021-12-05 22:50:46 +01:00
Moritz Marquardt
67a190f68a
Hotfix for #27: avoid slash before .html in GitHub compatibility redirects 2021-12-05 22:12:48 +01:00
6543
a7bb3448a4
move more args of Upstream() to upstream Options 2021-12-05 19:53:23 +01:00
6543
2f6b280fce
meaningfull var names 2021-12-05 19:02:26 +01:00
6543
5fe51d8621
rm certDB helper and build in 2021-12-05 19:00:57 +01:00
6543
a0534f1fde
make MaintainCertDB able to cancel 2021-12-05 18:26:54 +01:00
6543
26a199053b
lint: rename 2021-12-05 18:20:40 +01:00
6543
0374e95d23
make tryUpstream independent func 2021-12-05 18:20:39 +01:00