fix(gateway): load the proxy routes and ticket settings in every environment

The YARP routes, the bucket path transform and the StreamTicket section only
existed in appsettings.Development.json, so a Production run had no routes at
all and every /media request fell through to a 404. Move them to
appsettings.json and leave only the environment-specific overrides (key path)
in the Development file; the container gets the filer address, the bucket and
the allowed CORS origins from environment variables.
This commit is contained in:
2026-07-20 15:13:15 +02:00
parent 4d52877b35
commit 28e00ce0ca
2 changed files with 33 additions and 29 deletions
@@ -1,32 +1,5 @@
{
"StreamTicket": {
"PublicKeyPath": "D:\\weed\\stream_public.pem",
"Audience": "media-gateway",
"Issuer": "musify-webapi",
"QueryParameterName": "t",
"MediaPathPrefix": "/media"
},
"Cors": {
"AllowedOrigins": [ "http://localhost:5173", "http://localhost:3000" ]
},
"ReverseProxy": {
"Routes": {
"media": {
"ClusterId": "seaweed-filer",
"Match": { "Path": "/media/{**rest}" },
"Transforms": [
{ "PathPattern": "/buckets/webapi-storage/{**rest}" }
]
}
},
"Clusters": {
"seaweed-filer": {
"Destinations": {
"filer": { "Address": "http://localhost:8888/" }
}
}
}
"PublicKeyPath": "../../deploy/keys/stream_public.pem"
}
}
@@ -6,5 +6,36 @@
"Yarp": "Information"
}
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"StreamTicket": {
"PublicKeyPath": "",
"Audience": "media-gateway",
"Issuer": "musify-webapi",
"QueryParameterName": "t",
"MediaPathPrefix": "/media"
},
"Cors": {
"AllowedOrigins": []
},
"ReverseProxy": {
"Routes": {
"media": {
"ClusterId": "seaweed-filer",
"Match": { "Path": "/media/{**rest}" },
"Transforms": [
{ "PathPattern": "/buckets/webapi-storage/{**rest}" }
]
}
},
"Clusters": {
"seaweed-filer": {
"Destinations": {
"filer": { "Address": "http://localhost:8888/" }
}
}
}
}
}