RBAC + Per-Route Audit Events
This commit is contained in:
@@ -13,6 +13,12 @@ events {
|
||||
|
||||
http {
|
||||
real_ip_header X-Forwarded-For;
|
||||
real_ip_recursive on;
|
||||
set_real_ip_from 127.0.0.1;
|
||||
set_real_ip_from ::1;
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 172.16.0.0/12;
|
||||
set_real_ip_from 192.168.0.0/16;
|
||||
include /etc/nginx/mime.types;
|
||||
include options-ssl.conf;
|
||||
include options-http-headers.conf;
|
||||
@@ -22,6 +28,11 @@ http {
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
map $http_x_forwarded_for $forwarded_for {
|
||||
"" $remote_addr;
|
||||
default $http_x_forwarded_for;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
@@ -46,7 +57,7 @@ http {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
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-For $forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
include options-https-headers.conf;
|
||||
}
|
||||
@@ -55,4 +66,3 @@ http {
|
||||
access_log /var/log/nginx/access.log main;
|
||||
types_hash_bucket_size 128;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,12 @@ events {
|
||||
|
||||
http {
|
||||
real_ip_header X-Forwarded-For;
|
||||
real_ip_recursive on;
|
||||
set_real_ip_from 127.0.0.1;
|
||||
set_real_ip_from ::1;
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 172.16.0.0/12;
|
||||
set_real_ip_from 192.168.0.0/16;
|
||||
include /etc/nginx/mime.types;
|
||||
include options-ssl.conf;
|
||||
include options-http-headers.conf;
|
||||
@@ -22,6 +28,11 @@ http {
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
map $http_x_forwarded_for $forwarded_for {
|
||||
"" $remote_addr;
|
||||
default $http_x_forwarded_for;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
@@ -47,11 +58,11 @@ http {
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
include options-https-headers.conf;
|
||||
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-For $forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
include options-https-headers.conf;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user