diff --git a/api.conf b/api.conf new file mode 100644 index 0000000..039c488 --- /dev/null +++ b/api.conf @@ -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; + } +} diff --git a/config.js b/config.js index d96c257..7d174bc 100644 --- a/config.js +++ b/config.js @@ -10,7 +10,7 @@ var config = { debugPort: 3202 }, editor: { - url: "http://3d-editor.gamewheel.local", + url: "http://3d-editor.gamewheel.com", port: 3103, debugPort: 3203, cluster: false,