119 Commits (main)
 

Author SHA1 Message Date
Ben Harris c12dfb21be save defaultBranch we looked up for the timestamp lookup 11 months ago
~lucidiot d84955e6cd Fix URL building for default repo branch API
Using the base URL in path.Join caused it to remove the two slashes (because /////tmp == /tmp):

`https:/tildegit.org/api/v1/repos/owner/name`

Then, using that in URL.Parse causes it to see a `https:` scheme, and the / right afterwards means "start a path here", not a hostname, because hostnames begin with two slashes. That's a valid URL, with no hostname. Then it gets turned back into a string:

`https:///tildegit.org/api/v1/repos/owner/name`

That's another way of expressing the same URL with no hostname: //<empty hostname>/<path>.

curl, Firefox and Chromium all fix the triple slash automatically, but fasthttp doesn't, and it tries to look up the empty string as a DNS host!
11 months ago
Ben Harris 1955acce05 parse url correctly? 1 year ago
Ben Harris 54946a45d7 gitea api logging 1 year ago
Ben Harris 3e04412113 add some more logging so i can see where stuff is failing 1 year ago
Ben Harris 1d8f45ea99 tilde stuff 1 year ago
6543 6f12f2a8e4
fix bug 1 year ago
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>
1 year ago
6543 2dbc66d052
let golangci-lint have 5m to check 1 year ago
6543 1724d9fb2e
add "lint" to Justfile 1 year ago
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>
1 year ago
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>
1 year ago
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>
1 year ago
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>
1 year ago
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>
1 year ago
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
1 year ago
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...
1 year ago
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>
1 year ago
fnetx 4404287958
Update 404 Not found page 1 year ago
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
2 years ago
Moritz Marquardt adfc96ab94
Add --verbose flag and hide debug messages by default 2 years ago
Moritz Marquardt 73fa2da646
Update default to raw.codeberg.page & improve documentation on custom domains 2 years ago
6543 6af6523a0f
code format 2 years ago
6543 70c7065f76
fix #31 2 years ago
6543 aa0638903a
fix argument check and some nits 2 years ago
6543 196482da07
less panic 2 years ago
6543 5aae7c882f
Merge branch 'master' into refactoring 2 years ago
Moritz Marquardt 67a190f68a
Hotfix for #27: avoid slash before .html in GitHub compatibility redirects 2 years ago
6543 a7bb3448a4
move more args of Upstream() to upstream Options 2 years ago
6543 2f6b280fce
meaningfull var names 2 years ago
6543 5fe51d8621
rm certDB helper and build in 2 years ago
6543 a0534f1fde
make MaintainCertDB able to cancel 2 years ago
6543 26a199053b
lint: rename 2 years ago
6543 0374e95d23
make tryUpstream independent func 2 years ago
6543 e85f21ed2e
some renames 2 years ago
6543 a0e0d2d335
make certdb maintain go routine a own func 2 years ago
6543 de439f9bec
wrap cert db and make sync gracefull 2 years ago
6543 11fa729686
mv acme config setup into own func 2 years ago
6543 77e39b2213
unexport if posible 2 years ago
6543 e6198e4ddd
start refactor Upstream func 2 years ago
6543 de4706bf58
rm 2rm 2 years ago
6543 76c867cfca
move "http acme server setup" into own func 2 years ago
6543 b6c4c63fb4
own file 2 years ago
6543 ccada3e6df
split cert func to related packages 2 years ago
6543 bb6f28fe57
move setup of fastServer into own func 2 years ago
6543 b3830e979c
inject all cache 2 years ago
6543 2b49039252
add todo 2 years ago
6543 b28204a468
acme-api -> acme-api-endpoint 2 years ago
6543 97d4ea9d6b
main-domain-suffix -> pages-domain 2 years ago
6543 fdd04610e5
fix .domains and make it redable 2 years ago