feat (infra): add web address for public Garage content
This commit is contained in:
parent
4b2cf2be8d
commit
7612a56265
1 changed files with 19 additions and 9 deletions
|
@ -23,22 +23,32 @@ server {
|
|||
# Security headers
|
||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
|
||||
# Proxy Configuration
|
||||
location / {
|
||||
proxy_pass http://172.18.0.1:3900;
|
||||
|
||||
# S3 API for authenticated operations
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://172.18.0.1:3900/;
|
||||
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;
|
||||
|
||||
# CORS headers for web access
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
|
||||
add_header Access-Control-Allow-Headers "Authorization, Content-Type";
|
||||
|
||||
# Handle preflight requests
|
||||
# Handle preflight requests
|
||||
if ($request_method = 'OPTIONS') {
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Web endpoint for public file access
|
||||
|
||||
location / {
|
||||
proxy_pass http://172.18.0.1:3902;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue