diff --git a/config.js b/config.js index eead3f8..9240e42 100644 --- a/config.js +++ b/config.js @@ -11,8 +11,7 @@ var config = { platform: 'gamewheel', account: 'root', subAccount: 'root' - }, - uploadPath: '/uploads' + } }, api16: { url: "http://api-v1.6.gamewheel.local" @@ -28,7 +27,8 @@ var config = { uploadPath: '/uploads' }, api_v2: { - url: 'http://api-v2.gamewheel.local' + url: 'http://api-v2.gamewheel.local', + uploadPath : '/uploads' }, editor_v3: { url: 'http://3d-editor-v3.gamewheel.local', diff --git a/nginx/api-v2.conf b/nginx/api-v2.conf index 94bde94..5928795 100644 --- a/nginx/api-v2.conf +++ b/nginx/api-v2.conf @@ -9,6 +9,12 @@ server { 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 / { + add_header Access-Control-Allow-Origin $http_origin; + autoindex on; + try_files $uri $uri/ @node; + } + + location @node { proxy_pass_request_headers on; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -18,4 +24,5 @@ server { proxy_set_header Host $http_host; proxy_redirect off; } + } diff --git a/secure.js b/secure.js index b1d74aa..3b5ce7e 100644 --- a/secure.js +++ b/secure.js @@ -71,7 +71,6 @@ var secure = { autoIndex: false } }, - uploadPath : 'uploads', mailer: { host: 'localhost', port: 9025,