Limit museum API matchers to photos host

This commit is contained in:
Andreas Dueren
2025-11-20 23:40:08 -06:00
parent 1d4c57c737
commit e50abcb9a2

View File

@@ -1063,7 +1063,10 @@ cat > "$CADDY_CONFIG" <<EOF_CADDY
}
}
@user_api path_regexp user_api ^/users($|/.*)
@user_api {
host ${PHOTOS_HOST_MATCHERS}
path_regexp user_api ^/users($|/.*)
}
handle @user_api {
reverse_proxy localhost:8080 {
trusted_proxies private_ranges
@@ -1075,6 +1078,7 @@ cat > "$CADDY_CONFIG" <<EOF_CADDY
}
@museum_api_get {
host ${PHOTOS_HOST_MATCHERS}
method GET HEAD
path_regexp museum_api_get ^/(admin|authenticator|billing|cast|collections|custom-domain|diff|discount|email-hash|emails-from-hashes|emergency-contacts|family|file|file-link|files|fire|info|job|mail|metrics|multipart-upload-urls|offers|options|pass-info|passkeys|public-collection|push|queue|remote-store|storage-bonus|thumbnail|trash|unknown-api|upload-urls|user|user-entity|verify-password)(/|$)
}
@@ -1089,6 +1093,7 @@ cat > "$CADDY_CONFIG" <<EOF_CADDY
}
@write_methods {
host ${PHOTOS_HOST_MATCHERS}
not method GET
not method HEAD
}