aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/ircbot/nginx.conf
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-06-25 13:33:44 +0200
committerRobin Jarry <robin@jarry.cc>2023-07-01 18:26:35 +0200
commit91dbd6078192e017b88bf061bb730e9d16ed5088 (patch)
treeedc2f7fcf65b699cc048b5aa5476afea02ae2aed /contrib/ircbot/nginx.conf
parent69094e332779a71ddd47b88bced0992c290d67e7 (diff)
downloadaerc-91dbd6078192e017b88bf061bb730e9d16ed5088.tar.gz
contrib: add irc bot stuff
Add a small script to install a sourcehut webhook that triggers on patchset reception. Add a limnoria (supybot fork) plugin to receive the webhook requests and send IRC NOTICE messages on the proper channels. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'contrib/ircbot/nginx.conf')
-rw-r--r--contrib/ircbot/nginx.conf36
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/ircbot/nginx.conf b/contrib/ircbot/nginx.conf
new file mode 100644
index 00000000..b68f860a
--- /dev/null
+++ b/contrib/ircbot/nginx.conf
@@ -0,0 +1,36 @@
+limit_req_zone $binary_remote_addr zone=aercbot:1m rate=1r/s;
+
+server {
+ listen 443 ssl;
+ listen [::]:443 ssl;
+ server_name bot.diabeteman.com;
+
+ ssl_certificate /etc/dehydrated/certs/diabeteman.com/fullchain.pem;
+ ssl_certificate_key /etc/dehydrated/certs/diabeteman.com/privkey.pem;
+
+ client_max_body_size 150K;
+ limit_req zone=aercbot burst=10 nodelay;
+
+ location / {
+ allow 173.195.146.144;
+ allow 2604:bf00:710:0:5054:ff:fec4:6bfb;
+ allow 2a01:cb00:f8b:9700:84d0:c0d6:72c3:677c;
+ deny all;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_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-Proto $scheme;
+ proxy_redirect off;
+ proxy_buffering off;
+ proxy_request_buffering off;
+ proxy_pass http://127.0.0.1:7777;
+ }
+}
+
+server {
+ listen 80;
+ listen [::]:80;
+ server_name bot.diabeteman.com;
+ return 301 https://$host$request_uri;
+}