allow access to files without auth

This commit is contained in:
Kopatz
2025-05-31 13:32:31 +02:00
parent e2f799314f
commit 2fd1abd987
2 changed files with 13 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ in {
quic = cfg.https; quic = cfg.https;
http3 = cfg.https; http3 = cfg.https;
locations = { locations = {
"~* \\.(jpg|png)$".extraConfig = '' "~* ^/assets/.*\\.(jpg|png)$".extraConfig = ''
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Origin *;
''; '';
"/stash" = { "/stash" = {
@@ -70,6 +70,17 @@ in {
proxy_pass http://localhost:7777; proxy_pass http://localhost:7777;
''; '';
}; };
"/stash/files" = {
extraConfig = ''
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:7777;
'';
};
"/tracker-site" = { "/tracker-site" = {
tryFiles = "$uri $uri/ /tracker-site/index.html =404"; tryFiles = "$uri $uri/ /tracker-site/index.html =404";
}; };

View File

@@ -6,7 +6,7 @@ buildGoModule rec {
src = fetchGit { src = fetchGit {
url = "git@github.com:kropatz/kop-fileshare.git"; url = "git@github.com:kropatz/kop-fileshare.git";
ref = "master"; ref = "master";
rev = "73456c32d3d070d457f95973403ca94bdddea95d"; rev = "ac2c4114c65b21f840fa807e44edf54fffe2d4c7";
}; };
vendorHash = "sha256-OQ6rNgOQHrrhE7DT+ulwpWJCDJ4DeJiDzriAu3mfS7I="; vendorHash = "sha256-OQ6rNgOQHrrhE7DT+ulwpWJCDJ4DeJiDzriAu3mfS7I=";