diff options
author | Dessalines <tyhou13@gmx.com> | 2019-12-11 21:28:33 -0800 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-12-11 21:28:33 -0800 |
commit | 665dca80d00c3947a4838bbd468cfdcb9241ace5 (patch) | |
tree | d5cb8ac97b2ff27dbbfe72f2d7eaec4f797fe2a1 /ansible/templates | |
parent | 4cbfe6d0fc49fcaeaf95d1993ebe6b16fa49b1a3 (diff) |
Moving front end routes from nginx to actix
- Fixes #363
Diffstat (limited to 'ansible/templates')
-rw-r--r-- | ansible/templates/nginx.conf | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ansible/templates/nginx.conf b/ansible/templates/nginx.conf index c8afcf4b..a484594e 100644 --- a/ansible/templates/nginx.conf +++ b/ansible/templates/nginx.conf @@ -50,7 +50,6 @@ server { client_max_body_size 50M; location / { - rewrite (\/(user|(?<!feeds\/)u\/|(?<!feeds\/)inbox|post|community|(?<!feeds\/)c\/|create_post|create_community|login|search|setup|sponsors|communities|modlog|home|password_change)+) /static/index.html break; proxy_pass http://0.0.0.0:8536; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; @@ -73,4 +72,16 @@ server { expires max; } } + # Anonymize IP addresses + # https://www.supertechcrew.com/anonymizing-logs-nginx-apache/ + map $remote_addr $remote_addr_anon { + ~(?P<ip>\d+\.\d+\.\d+)\. $ip.0; + ~(?P<ip>[^:]+:[^:]+): $ip::; + 127.0.0.1 $remote_addr; + ::1 $remote_addr; + default 0.0.0.0; + } + log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" "$http_user_agent"'; + access_log /dev/stdout main; } |