Same-origin API: empty VITE_API_URL with nginx proxy to backend-1.
Frontends call /api/ on ark-library.com; nginx forwards internally to 100.93.205.19. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
18
deploy/nginx-frontend-native.conf
Normal file
18
deploy/nginx-frontend-native.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
# Native system nginx (not Docker). SPA root: /var/www/ark-library
|
||||
# Snippet: /etc/nginx/snippets/ark-library-frontend.inc
|
||||
# ALB terminates TLS; apex uses X-Forwarded-Proto so we do not 301-loop behind the LB.
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
server_name ark-library.com www.ark-library.com;
|
||||
|
||||
if ($http_x_forwarded_proto != "https") {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
root /var/www/ark-library;
|
||||
index index.html;
|
||||
|
||||
include /etc/nginx/snippets/ark-library-frontend.inc;
|
||||
}
|
||||
Reference in New Issue
Block a user