diff --git a/FastapiOpenRestyConfigurator/requirements.txt b/FastapiOpenRestyConfigurator/requirements.txt index 03d49fc..7cdce72 100644 --- a/FastapiOpenRestyConfigurator/requirements.txt +++ b/FastapiOpenRestyConfigurator/requirements.txt @@ -1,6 +1,6 @@ -fastapi==0.75.2 +fastapi==0.77.1 uvicorn==0.17.6 -werkzeug==2.1.1 -Jinja2==3.1.1 +werkzeug==2.1.2 +Jinja2==3.1.2 python-dotenv==0.20.0 gunicorn==20.1.0 \ No newline at end of file diff --git a/examples/templates/jupyternotebook%v01.conf b/examples/templates/jupyternotebook%v01.conf index 13d66fb..55cda59 100644 --- a/examples/templates/jupyternotebook%v01.conf +++ b/examples/templates/jupyternotebook%v01.conf @@ -18,16 +18,21 @@ location /{{ key_url }} { end } - # After check via lua-oidc is done, start reverse proxying this backend by configuring a billion headers. - proxy_pass {{ location_url }}; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $http_host; - proxy_http_version 1.1; - proxy_redirect off; - proxy_buffering off; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_read_timeout 86400; + proxy_pass {{ location_url }}; + proxy_http_version 1.1; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + proxy_set_header X-Scheme $scheme; + + client_max_body_size 0; + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header Referrer-Policy "same-origin" always; + } \ No newline at end of file diff --git a/examples/templates/jupyternotebook%v02.conf b/examples/templates/jupyternotebook%v02.conf index 8ecfbf2..d944ecd 100644 --- a/examples/templates/jupyternotebook%v02.conf +++ b/examples/templates/jupyternotebook%v02.conf @@ -20,15 +20,21 @@ location /{{ key_url }} { } # After check via lua-oidc is done, start reverse proxying this backend by configuring a billion headers. - proxy_pass {{ location_url }}; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $http_host; - proxy_http_version 1.1; - proxy_redirect off; - proxy_buffering off; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_read_timeout 86400; + proxy_pass {{ location_url }}; + proxy_http_version 1.1; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + proxy_set_header X-Scheme $scheme; + + client_max_body_size 0; + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header Referrer-Policy "same-origin" always; + } \ No newline at end of file diff --git a/examples/templates/jupyternotebook%v03.conf b/examples/templates/jupyternotebook%v03.conf index b3467d4..a382c0d 100644 --- a/examples/templates/jupyternotebook%v03.conf +++ b/examples/templates/jupyternotebook%v03.conf @@ -44,15 +44,21 @@ } # After check via lua-oidc is done, start reverse proxying this backend by configuring a billion headers. - proxy_pass {{ location_url }}; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header Host $http_host; - proxy_http_version 1.1; - proxy_redirect off; - proxy_buffering off; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_read_timeout 86400; + + proxy_pass {{ location_url }}; + proxy_http_version 1.1; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_read_timeout 20d; + proxy_set_header X-Scheme $scheme; + + client_max_body_size 0; + add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; + add_header Referrer-Policy "same-origin" always; } \ No newline at end of file