From 9adf08522c71cb268353bee729028876f01f3532 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 4 May 2020 15:43:09 -0400 Subject: [PATCH] nginx portion of https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/623 --- salt/nginx/etc/nginx.conf.so-eval | 14 ++++++++++++++ salt/nginx/etc/nginx.conf.so-master | 14 ++++++++++++++ salt/nginx/etc/nginx.conf.so-mastersearch | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/salt/nginx/etc/nginx.conf.so-eval b/salt/nginx/etc/nginx.conf.so-eval index 61d91ba20..336d27343 100644 --- a/salt/nginx/etc/nginx.conf.so-eval +++ b/salt/nginx/etc/nginx.conf.so-eval @@ -146,6 +146,20 @@ http { } + location /cyberchef/ { + auth_request /auth/sessions/whoami; + proxy_read_timeout 90; + proxy_connect_timeout 90; + 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 Proxy ""; + } + + location /cyberchef { + rewrite ^ /cyberchef/ permanent; + } + location /packages/ { try_files $uri =206; auth_request /auth/sessions/whoami; diff --git a/salt/nginx/etc/nginx.conf.so-master b/salt/nginx/etc/nginx.conf.so-master index 46e910a17..33edb9c3e 100644 --- a/salt/nginx/etc/nginx.conf.so-master +++ b/salt/nginx/etc/nginx.conf.so-master @@ -146,6 +146,20 @@ http { } + location /cyberchef/ { + auth_request /auth/sessions/whoami; + proxy_read_timeout 90; + proxy_connect_timeout 90; + 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 Proxy ""; + } + + location /cyberchef { + rewrite ^ /cyberchef/ permanent; + } + location /packages/ { try_files $uri =206; auth_request /auth/sessions/whoami; diff --git a/salt/nginx/etc/nginx.conf.so-mastersearch b/salt/nginx/etc/nginx.conf.so-mastersearch index 46e910a17..33edb9c3e 100644 --- a/salt/nginx/etc/nginx.conf.so-mastersearch +++ b/salt/nginx/etc/nginx.conf.so-mastersearch @@ -146,6 +146,20 @@ http { } + location /cyberchef/ { + auth_request /auth/sessions/whoami; + proxy_read_timeout 90; + proxy_connect_timeout 90; + 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 Proxy ""; + } + + location /cyberchef { + rewrite ^ /cyberchef/ permanent; + } + location /packages/ { try_files $uri =206; auth_request /auth/sessions/whoami;