api config
parent
95662fa21a
commit
2488c4fd96
|
@ -0,0 +1,37 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
# Replace here with proper server FQDN
|
||||
server_name api.gamewheel.local;
|
||||
|
||||
# Replace here with proper logs paths
|
||||
access_log /var/log/nginx/api.gamewheel.local.access.log;
|
||||
error_log /var/log/nginx/api.gamewheel.local.error.log;
|
||||
|
||||
# Replace here with proper certificates paths
|
||||
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
||||
|
||||
ssl_session_timeout 5m;
|
||||
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# Replace here with proper allowed origins
|
||||
# add_header Access-Control-Allow-Origin "http://app.gamewheel.local";
|
||||
# add_header Access-Control-Allow-Credentials true;
|
||||
add_header Access-Control-Allow-Methods 'HEAD, GET, POST, PUT, DELETE, OPTIONS';
|
||||
add_header Access-Control-Allow-Headers 'origin, x-requested-with, content-type, accept, authorization, Access-Control-Request-Headers, Access-Control-Request-Method, x-gw-api-rt-key, x-gw-api-rt-token';
|
||||
|
||||
location / {
|
||||
proxy_pass_request_headers on;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
# Replace here with proper host/port
|
||||
proxy_pass http://127.0.0.1:3104;
|
||||
proxy_ssl_session_reuse off;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue