docs: add nginx tenant onboarding template and backend handoff doc
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Adds a copy-paste server block template for onboarding a new marketplace domain, and a Sprint 16 backend handoff doc covering the still-missing draft/publish persistence endpoints, server-side validation expectations, and the slug/route inconsistency in static-page data.
This commit is contained in:
54
nginx.conf
54
nginx.conf
@@ -94,3 +94,57 @@ server {
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
}
|
||||
|
||||
# Template for onboarding a new marketplace tenant.
|
||||
# Replace NEWMARKETPLACE.EXAMPLE.COM, /var/www/newmarketplace, and the
|
||||
# api.newmarketplace.example.com:443 proxy target with the real values,
|
||||
# then rename this block's server_name/root before deploying.
|
||||
server {
|
||||
listen 80;
|
||||
server_name newmarketplace.example.com www.newmarketplace.example.com;
|
||||
|
||||
root /var/www/newmarketplace/browser;
|
||||
index index.html;
|
||||
|
||||
# Angular routing - serve index.html for all routes (client-side router
|
||||
# handles /edit, /:lang/edit/:section, etc. once index.html is served)
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
|
||||
# Proxy API calls to backend
|
||||
location /api {
|
||||
proxy_pass https://api.newmarketplace.example.com:443;
|
||||
proxy_set_header Host api.newmarketplace.example.com;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
rewrite ^/api(/.*)$ $1 break;
|
||||
proxy_ssl_verify off;
|
||||
}
|
||||
|
||||
# Static assets caching
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# Don't cache index.html
|
||||
location = /index.html {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
add_header Pragma "no-cache";
|
||||
add_header Expires "0";
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
|
||||
gzip_min_length 1000;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user