Codeberg/pages-server
26
387
Fork
You've already forked pages-server
54

HSTS preventing branch.repo.user.domain.tld subdomains from being accessed without custom domain #272

Open
opened 2024年01月07日 22:54:59 +01:00 by ATMmachine · 3 comments

Potentially intended behavior, as use of that path is designed for DNS of custom domains whereas a custom certificate is issued—if that is the case or it's not worth changing it, simply close this issue.

Because the domain name has HSTS enabled, Firefox and other browsers will refuse to connect to subdomains on fourth and fifth levels (branch.repo.user.domain.tld). I believe this is because the certificate issued is only valid for *.codeberg.page and codeberg.page, where it needs to have *.*.*.codeberg.page, *.*.codeberg.page, *.codeberg.page, and codeberg.page. This is as wildcards in certificates only work to one level iirc, the level it is placed on (e.g. why *.codeberg.page doesn't cover codeberg.page).

This could be a Codeberg deployment specific issue, in which case please direct me to where to file that, but as certificates are issued automatically, I presume the pages-server would need modification.

Potentially intended behavior, as use of that path is designed for DNS of custom domains whereas a custom certificate is issued—if that is the case or it's not worth changing it, simply close this issue. Because the domain name has HSTS enabled, Firefox and other browsers will refuse to connect to subdomains on fourth and fifth levels (**branch**.**repo**.user.domain.tld). I believe this is because the certificate issued is only valid for \*.codeberg.page and codeberg.page, where it needs to have \*.\*.\*.codeberg.page, \*.\*.codeberg.page, \*.codeberg.page, and codeberg.page. This is as wildcards in certificates only work to one level iirc, the level it is placed on (e.g. why *.codeberg.page doesn't cover codeberg.page). This could be a Codeberg deployment specific issue, in which case please direct me to where to file that, but as certificates are issued automatically, I presume the pages-server would need modification.

I think this is somewhat related to #235. We need to find a solution for that problem.

I think this is somewhat related to #235. We need to find a solution for that problem.

I'm experiencing this as well.

Repo: https://codeberg.org/r12t/robertvanbregt-nl-hallo/src/branch/pages/

Working:
https://robertvanbregt.nl/

Redirect to apex:
https://www.robertvanbregt.nl/

Certificate Errors:
https://robertvanbregt-nl-hallo.r12t.codeberg.page/
https://pages.robertvanbregt-nl-hallo.r12t.codeberg.page/

The codeberg.page domains should redirect to the custom domain, but don't.

I'm experiencing this as well. Repo: https://codeberg.org/r12t/robertvanbregt-nl-hallo/src/branch/pages/ Working: https://robertvanbregt.nl/ Redirect to apex: https://www.robertvanbregt.nl/ Certificate Errors: https://robertvanbregt-nl-hallo.r12t.codeberg.page/ https://pages.robertvanbregt-nl-hallo.r12t.codeberg.page/ The codeberg.page domains should redirect to the custom domain, but don't.

Perhaps already known, but Netlify uses double hyphens (--) to separate users, repos and branches. Translated to Codeberg style that would become:

User page: https://username.codeberg.page/ --> https://username.codeberg.page/ (no change)

Project page: https://repo.username.codeberg.page/ --> https://repo--username.codeberg.page/

Branch page: https://branch.repo.username.codeberg.page/ --> https://branch--repo--username.codeberg.page/

Perhaps already known, but Netlify uses double hyphens (`--`) to separate users, repos and branches. Translated to Codeberg style that would become: User page: https://username.codeberg.page/ --> https://username.codeberg.page/ (no change) Project page: https://repo.username.codeberg.page/ --> https://repo--username.codeberg.page/ Branch page: https://branch.repo.username.codeberg.page/ --> https://branch--repo--username.codeberg.page/
Sign in to join this conversation.
No Branch/Tag specified
main
no-not-allow-for-new-users
pages
pages-custom-domain-update
ci_user-local-acme-service
feat/redis-caching
fix/memory-problem
v6.4
v6.3
v6.2.1
v6.2
v6.1
v6.0
v5.1
v5.0
v4.6.3
v4.6.2
v4.6.1
v4.6
v4.5
v4.4
v4.3
v4.2
v4.1
v4.0
v3.2.1
v3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v3.1
v3.0a
v3.0
v2.5b
v2.5a
v2.5
v2.4
v2.3
v2.2
v2.1
v2.0
v1.0_php
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/pages-server#272
Reference in a new issue
Codeberg/pages-server
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?