api config

beta.r3js.org
Theunis J. Botha 2016-10-31 12:38:33 +01:00
parent 95662fa21a
commit 2488c4fd96
2 changed files with 38 additions and 1 deletions

37
api.conf Normal file
View File

@ -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;
}
}

View File

@ -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,