diff --git a/roles/web-static/templates/nginx.conf.j2 b/roles/web-static/templates/nginx.conf.j2 index 771bb53..25142f6 100644 --- a/roles/web-static/templates/nginx.conf.j2 +++ b/roles/web-static/templates/nginx.conf.j2 @@ -95,8 +95,12 @@ server { {% endif %} {% if a.name == 'chat_web_app' and a.env == 'prod' %} - # HeyCatch short links. Unknown paths 404, so the SDK never sees /x. - location ~ ^/([a-z0-9])$ { + # HeyCatch short links. + # f Facebook, h Threads, i Instagram, l LinkedIn, r Reddit, x X, y YouTube. + # Relative Location: this vhost listens on the container port. An absolute + # redirect would publish that port (hesychia.ai:8082). + location ~ ^/([a-z0-9])/?$ { + absolute_redirect off; return 302 /?utm_source=heycatch&utm_campaign=$1; } {% endif %}