Repository: ssbc/go-ssb-room (language: go)

Issue:
JSON alias endpoint not working
This one is easy to test: open this URL https://staltzphone.hermies.club?encoding=json and it should respond with a JSON body.


Discussion / hints:
ouch. This slipped through #117 - the alias forwarding wrongly strips the rest of the url
Fixed on the demo server, updating config here now.

Fix patch:
diff --git a/docs/nginx-example.conf b/docs/nginx-example.conf
index aa91f362..3b37223b 100644
--- a/docs/nginx-example.conf
+++ b/docs/nginx-example.conf
@@ -40,7 +40,9 @@ server {
         proxy_set_header X-Forwarded-Host $host;
         proxy_set_header X-Forwarded-For $remote_addr:$remote_port;
         proxy_set_header X-Forwarded-Proto $scheme;
-        proxy_pass http://localhost:8899/alias/$alias;
+        # "rewrite" requests with subdomains to the non-wildcard url for alias resolving
+        # $is_args$args pass on ?encoding=json if present
+        proxy_pass http://localhost:8899/alias/$alias$is_args$args;
     }
 
     location / {


Test patch: