Fix prod WebSockets (nginx upgrade) + incident list ordering#46
Merged
Conversation
…rade in prod nginx default.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viadefault.conf, which lacked the WebSocket-upgrade block that dev'slocal.confhas, so/ws/was proxied as plain HTTP → daphne never got the handshake. Added themap $http_upgrade+proxy_http_version 1.1+Upgrade/Connectionheaders. 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/IncidentByZoneAPIViewsorted 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.