Skip to content

Fix prod WebSockets (nginx upgrade) + incident list ordering#46

Merged
immerSIR merged 1 commit into
223MapAction:mainfrom
immerSIR:fix-ws-and-ordering
Jul 1, 2026
Merged

Fix prod WebSockets (nginx upgrade) + incident list ordering#46
immerSIR merged 1 commit into
223MapAction:mainfrom
immerSIR:fix-ws-and-ordering

Conversation

@immerSIR

@immerSIR immerSIR commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Two prod-only issues after cutover (app logic is already identical to dev; these are infra + a UUID side-effect).

1. WebSockets (all wss:// broken). Prod's nginx serves via default.conf, which lacked the WebSocket-upgrade block that dev's local.conf has, so /ws/ was proxied as plain HTTP → daphne never got the handshake. Added the map $http_upgrade + proxy_http_version 1.1 + Upgrade/Connection headers. Verified live: wss://api.map-action.com/ws/activity-feed/ now returns 101 Switching Protocols. (Already applied+reloaded on the server; this PR persists it across deploys.)

2. Incident list out of creation order. IncidentAPIListView/IncidentByZoneAPIView sorted by -pk; that was newest-first with the old integer IDs but is random now that PKs are UUIDs. Changed to -created_at.

Impact-page 500 and English activity feed were separate data issues (old merged prod rows) and are handled by migrating the data to dev shape — no code change.

@immerSIR immerSIR merged commit 6fac774 into 223MapAction:main Jul 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant