openvibers/openvibe.live Commits

nginx: PowerChat's webhook goes to OpenVibe.Billing (Billing cutover step 4; the signature covers the body, not the URL) (#172)

OP OpenVibers committed 27 days ago · c36609f37c · 1 file, +13 −0

Changes

ddiff --git a/deploy/nginx/openvibe.live.conf b/deploy/nginx/openvibe.live.conf
iindex ce6065ea..06dec506 100644
---- a/deploy/nginx/openvibe.live.conf
++++ b/deploy/nginx/openvibe.live.conf
@@@ -140,6 +140,19 @@ server {
# Chat's calls locations for this site (the [f] glob keeps it a no-op without Chat, like the line above).
include /opt/openvibe.chat/deploy/nginx/calls/openvibe.live-calls.locations.con[f];
++ # PowerChat's webhook belongs to OpenVibe.Billing since the money cutover (Billing docs/live-cutover.md step 4).
++ # PowerChat signs the timestamp and raw body, not the URL, so Billing verifies deliveries sent to this address.
++ location = /api/powerchat/webhook {
++ limit_req zone=api_limit burst=40 nodelay;
++ client_max_body_size 1m;
++ proxy_pass http://127.0.0.1:4600/webhooks/powerchat;
++ proxy_http_version 1.1;
++ proxy_set_header Host billing.openvibe.network;
++ proxy_set_header X-Real-IP $remote_addr;
++ proxy_set_header X-Forwarded-For $remote_addr;
++ proxy_set_header X-Forwarded-Proto $scheme;
++ }
++
location /api/ {
limit_req zone=api_limit burst=40 nodelay;
client_max_body_size 10m;