diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 5764a5d..9567d33 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -49,7 +49,7 @@ jobs: - name: Build archive shell: bash - run: cp "target/release/desktop" "dist/" + run: cp "target/release/ascella-desktop" "dist/" - uses: actions/upload-artifact@v2.2.4 with: diff --git a/ascella/nginx/ascella.wtf.nginx b/ascella/nginx/ascella.wtf.nginx index 532521b..516ecca 100644 --- a/ascella/nginx/ascella.wtf.nginx +++ b/ascella/nginx/ascella.wtf.nginx @@ -1,3 +1,5 @@ +# https://gist.github.com/plentz/6737338 + server { listen 443 ssl http2; listen [::]:443 ssl http2; @@ -5,22 +7,11 @@ server { include snippets/self-signed.conf; include snippets/ssl-params.conf; + + add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - location /v2 { - if ($request_method ~* "(GET|POST)") { - add_header "Access-Control-Allow-Origin" *; - } - - if ($request_method = OPTIONS ) { - add_header "Access-Control-Allow-Origin" *; - add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD"; - add_header "Access-Control-Allow-Headers" "Authorization, x-user-id, x-user-token, x-user-key, Origin, X-Requested-With, Content-Type, Accept"; - add_header 'Content-Type' 'text/plain; charset=utf-8'; - add_header 'Content-Length' 0; - - return 200; - } + location /v2 { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; @@ -29,5 +20,4 @@ server { proxy_pass http://127.0.0.1:7878; proxy_redirect off; } - } \ No newline at end of file