Add automatic SSL certificate generation
All checks were successful
Build and Push / build-all (push) Successful in 8m13s
All checks were successful
Build and Push / build-all (push) Successful in 8m13s
This commit is contained in:
parent
e13fffdaac
commit
42855330c0
11 changed files with 105 additions and 38 deletions
|
|
@ -675,6 +675,31 @@ http {
|
|||
return 403;
|
||||
}
|
||||
|
||||
# Public stickers endpoint - no authentication required (guests need stickers for chat)
|
||||
location = /api/admin/stickers {
|
||||
# CORS headers
|
||||
add_header Access-Control-Allow-Origin $cors_origin always;
|
||||
add_header Access-Control-Allow-Methods "GET, OPTIONS" always;
|
||||
add_header Access-Control-Allow-Headers "Content-Type" always;
|
||||
add_header Access-Control-Allow-Credentials "true" always;
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header Content-Length 0;
|
||||
add_header Content-Type text/plain;
|
||||
return 204;
|
||||
}
|
||||
|
||||
proxy_pass http://backend;
|
||||
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;
|
||||
|
||||
# Cache stickers list for 5 minutes
|
||||
expires 5m;
|
||||
add_header Cache-Control "public, max-age=300" always;
|
||||
}
|
||||
|
||||
# Other API endpoints (authenticated)
|
||||
location /api/ {
|
||||
limit_req zone=api_limit burst=20 nodelay;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue