Files

55 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2026-05-03 18:35:00 +00:00
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /gitea-feed {
proxy_pass https://git.winniepat.de/winnie.rss;
proxy_set_header Host git.winniepat.de;
proxy_ssl_server_name on;
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type" always;
if ($request_method = OPTIONS) {
return 204;
}
}
location /gitea-repo-feed/ {
rewrite ^/gitea-repo-feed/(.+)$ /$1.rss break;
proxy_pass https://git.winniepat.de;
proxy_set_header Host git.winniepat.de;
proxy_ssl_server_name on;
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type" always;
if ($request_method = OPTIONS) {
return 204;
}
}
location /gitea-api/ {
proxy_pass https://git.winniepat.de/api/v1/;
proxy_set_header Host git.winniepat.de;
proxy_ssl_server_name on;
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
add_header Access-Control-Allow-Headers "Content-Type" always;
if ($request_method = OPTIONS) {
return 204;
}
}
}