47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
# Gzip compression for faster transfers
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Standard security headers
|
|
add_header X-Frame-Options "SAMEORIGIN";
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
# Browser caching for static assets
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|webp)$ {
|
|
expires 30d;
|
|
add_header Cache-Control "public, no-transform";
|
|
}
|
|
|
|
# Proxy for the webhook
|
|
location /api/webhook {
|
|
proxy_pass https://n8n.mohandl3g.ly/webhook/cute;
|
|
proxy_set_header MohandL3G-Auth "Ms@199903";
|
|
proxy_set_header Content-Type "application/json";
|
|
|
|
proxy_ssl_server_name on;
|
|
proxy_hide_header Access-Control-Allow-Origin;
|
|
add_header Access-Control-Allow-Origin "*";
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
}
|
|
}
|