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 / scripts / allen / nginx-allen-zones.conf

38 lines · 1934 bytes Raw Blame History
1# /etc/nginx/conf.d/aienos-allen.conf (http context) - public Allen chat.
2# Keys are the visitor address from the PROXY protocol header that the :443
3# stream router adds for www.aienos.com only. $remote_addr stays 127.0.0.1 for
4# the rest of the site, so the site's own access log is unchanged.
5limit_req_zone $proxy_protocol_addr zone=allen_chat:10m rate=6r/m;
6limit_req_zone $proxy_protocol_addr zone=allen_omega:10m rate=12r/m;
7limit_req_zone $proxy_protocol_addr zone=allen_api:10m rate=60r/m;
8limit_req_zone $proxy_protocol_addr zone=allen_submit:10m rate=6r/m;
9limit_req_zone $proxy_protocol_addr zone=allen_voice:10m rate=6r/m;
10limit_req_zone $proxy_protocol_addr zone=allen_infer:10m rate=12r/m;
11limit_conn_zone $proxy_protocol_addr zone=allen_conn:10m;
12
13# Cross-site gate for every POST route (security survey F1; the gateway applies the same rule).
14# Origin must be the site's own; no Origin is allowed only without Sec-Fetch-Site too (a
15# server-side client such as the X bot; every browser sends Origin on POST).
16map "$http_origin|$http_sec_fetch_site" $allen_xsite {
17 default 1;
18 "~^https://(www\.)?aienos\.com\|" 0;
19 "|" 0;
20}
21# JSON bodies only, so a cross-site "simple" request (text/plain, form) never reaches the gateway.
22map $content_type $allen_notjson {
23 default 1;
24 "~*^application/json[ \t]*(;|$)" 0;
25}
26# The A2A location also accepts application/a2a+json. $allen_notjson stays
27# application/json only, so chat and introduce do not take that media type.
28map $content_type $allen_a2a_notjson {
29 default 1;
30 "~*^application/json[ \t]*(;|$)" 0;
31 "~*^application/a2a\\+json[ \t]*(;|$)" 0;
32}
33
34# The gateway listens only on the Spark's tailnet address.
35upstream allen_chat_gateway {
36 server 100.64.0.2:18110 max_fails=0;
37 keepalive 4;
38}