2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
14 upstream webshell_upstream:
15 - server: '__HOSTNAME_INT__:4200 fail_timeout=10s'
25 - server_name: __HOSTNAME_EXT__
27 - __WEBSHELL_EXT_SSL_PORT__ http2 ssl
28 - index: index.html index.htm
29 - location /__HOSTNAME_EXT__:
30 - proxy_pass: 'http://webshell_upstream'
31 - proxy_read_timeout: 90
32 - proxy_connect_timeout: 90
33 - proxy_set_header: 'Host $http_host'
34 - proxy_set_header: 'X-Real-IP $remote_addr'
35 - proxy_set_header: X-Forwarded-Proto https
36 - proxy_set_header: 'X-Forwarded-For $proxy_add_x_forwarded_for'
37 - proxy_ssl_session_reuse: 'off'
39 - "if ($request_method = 'OPTIONS')":
40 - add_header: "'Access-Control-Allow-Origin' '*'"
41 - add_header: "'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'"
42 - add_header: "'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'"
43 - add_header: "'Access-Control-Max-Age' 1728000"
44 - add_header: "'Content-Type' 'text/plain charset=UTF-8'"
45 - add_header: "'Content-Length' 0"
48 - "if ($request_method = 'POST')":
49 - add_header: "'Access-Control-Allow-Origin' '*'"
50 - add_header: "'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'"
51 - add_header: "'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'"
53 - "if ($request_method = 'GET')":
54 - add_header: "'Access-Control-Allow-Origin' '*'"
55 - add_header: "'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'"
56 - add_header: "'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type'"
58 - include: 'snippets/arvados-snakeoil.conf'
59 - access_log: /var/log/nginx/webshell.__CLUSTER__.__DOMAIN__.access.log combined
60 - error_log: /var/log/nginx/webshell.__CLUSTER__.__DOMAIN__.error.log