mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-18 03:58:52 +00:00
Fix alias traversal (#20076)
see https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md Co-authored-by: 6543 <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
6543
parent
08e72ba147
commit
a5af778401
@@ -88,8 +88,8 @@ server {
|
||||
listen 80;
|
||||
server_name git.example.com;
|
||||
|
||||
location /_/static/assets {
|
||||
alias /path/to/gitea/public;
|
||||
location /_/static/assets/ {
|
||||
alias /path/to/gitea/public/;
|
||||
}
|
||||
|
||||
location / {
|
||||
@@ -120,8 +120,8 @@ server {
|
||||
listen 80;
|
||||
server_name cdn.example.com;
|
||||
|
||||
location /gitea {
|
||||
alias /path/to/gitea/public;
|
||||
location /gitea/ {
|
||||
alias /path/to/gitea/public/;
|
||||
}
|
||||
|
||||
location / {
|
||||
@@ -362,4 +362,4 @@ gitea:
|
||||
- "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000"
|
||||
```
|
||||
|
||||
This config assumes that you are handling HTTPS on the traefik side and using HTTP between Gitea and traefik.
|
||||
This config assumes that you are handling HTTPS on the traefik side and using HTTP between Gitea and traefik.
|
||||
|
||||
Reference in New Issue
Block a user