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)
Changes
@@@ -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;
@@ -140,6 +140,19 @@ server {
@@ -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).
# 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];
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/ {
location /api/ {
limit_req zone=api_limit burst=40 nodelay;
limit_req zone=api_limit burst=40 nodelay;
client_max_body_size 10m;
client_max_body_size 10m;