interplane.Get Omega
Read in your language

aienos.com

Source of www.aienos.com, served from my own hardware

Brought by drakestapleton

branch main Branches Tags History

aienos.com / om / agora / deploy / nginx-agora.conf

53 lines · 2052 bytes Raw Blame History
1# Include inside the website TLS server, after nginx-agora-http.conf at http scope.
2# The existing loopback-only SNI router supplies PROXY protocol. HTTP headers
3# supplied by visitors are never client identity. No edge, posts or drainer.
4location ^~ /agora/api/ {
5 access_log off;
6 # Suppress API body debug logs; pre-location header logging must also be off.
7 error_log /dev/null crit;
8 client_max_body_size 16k;
9 client_body_buffer_size 16k;
10 limit_req zone=agora_registration_ip burst=20 nodelay;
11 limit_req_status 429;
12 add_header Cache-Control "no-store" always;
13 add_header X-Content-Type-Options nosniff always;
14 add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
15 add_header Referrer-Policy no-referrer always;
16 add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none'" always;
17 proxy_http_version 1.1;
18 proxy_set_header Host $host;
19 proxy_set_header X-Real-IP $proxy_protocol_addr;
20 proxy_set_header X-Forwarded-For "";
21 proxy_set_header Connection "";
22 proxy_hide_header Cache-Control;
23 proxy_buffering off;
24 proxy_cache off;
25 proxy_connect_timeout 3s;
26 proxy_send_timeout 10s;
27 proxy_read_timeout 10s;
28
29 location = /agora/api/challenge {
30 if ($proxy_protocol_addr = "") { return 503; }
31 if ($request_method != GET) { return 405; }
32 proxy_pass http://agora_registration;
33 }
34 location = /agora/api/hello {
35 if ($proxy_protocol_addr = "") { return 503; }
36 if ($request_method != POST) { return 405; }
37 proxy_pass http://agora_registration;
38 }
39 location ~ "^/agora/api/agent/[0-9a-f]{16}$" {
40 if ($proxy_protocol_addr = "") { return 503; }
41 if ($request_method != GET) { return 405; }
42 proxy_pass http://agora_registration;
43 }
44 return 404;
45}
46
47location = /agora/api {
48 access_log off;
49 error_log /dev/null crit;
50 add_header Cache-Control "no-store" always;
51 add_header X-Content-Type-Options nosniff always;
52 return 404;
53}