fix: quote API key header in nginx-demo.conf to prevent empty-value crash
- Wrap ${ANTHROPIC_API_KEY} in quotes so envsubst produces valid nginx
directive even when the variable is empty
- Skip Docker container polling when runtime is unavailable (stops
log spam in demo/Portainer deployments)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a576b92ef6
commit
35be32711f
@ -77,7 +77,7 @@ http {
|
|||||||
proxy_pass https://api.anthropic.com;
|
proxy_pass https://api.anthropic.com;
|
||||||
proxy_ssl_server_name on;
|
proxy_ssl_server_name on;
|
||||||
proxy_set_header Host api.anthropic.com;
|
proxy_set_header Host api.anthropic.com;
|
||||||
proxy_set_header x-api-key ${ANTHROPIC_API_KEY};
|
proxy_set_header x-api-key "${ANTHROPIC_API_KEY}";
|
||||||
proxy_set_header anthropic-version "2023-06-01";
|
proxy_set_header anthropic-version "2023-06-01";
|
||||||
proxy_set_header Content-Type "application/json";
|
proxy_set_header Content-Type "application/json";
|
||||||
|
|
||||||
|
|||||||
@ -1006,6 +1006,8 @@ server.listen(PORT, '0.0.0.0', async () => {
|
|||||||
console.log('Mock backend is running. Press Ctrl+C to stop.\n')
|
console.log('Mock backend is running. Press Ctrl+C to stop.\n')
|
||||||
|
|
||||||
// Periodically update package data from Docker (merge with static dev apps)
|
// Periodically update package data from Docker (merge with static dev apps)
|
||||||
|
// Only poll if container runtime is available (avoids log spam in demo/Docker deployments)
|
||||||
|
if (runtime.available) {
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
const dockerApps = await getDockerContainers()
|
const dockerApps = await getDockerContainers()
|
||||||
mockData['package-data'] = mergePackageData(dockerApps)
|
mockData['package-data'] = mergePackageData(dockerApps)
|
||||||
@ -1019,6 +1021,7 @@ server.listen(PORT, '0.0.0.0', async () => {
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
}, 5000) // Update every 5 seconds
|
}, 5000) // Update every 5 seconds
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
process.on('SIGINT', () => {
|
process.on('SIGINT', () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user