Skip to content

Comments

Limit Next.js delegation to GET/HEAD requests#1318

Merged
victorlin merged 1 commit intomasterfrom
victorlin/fix-error-routing
Feb 24, 2026
Merged

Limit Next.js delegation to GET/HEAD requests#1318
victorlin merged 1 commit intomasterfrom
victorlin/fix-error-routing

Conversation

@victorlin
Copy link
Member

@victorlin victorlin commented Feb 23, 2026

Without this, some invalid POST requests would time out or fail with a 500 server error:

curl -i -X POST \
  -H "Content-Type: multipart/form-data" \
  -H "Accept: text/html" \
  http://localhost:5000/

These now respond with 404 not found.

Slack thread

Checklist

  • Checks pass

  • Tested locally

     $ curl -i -X POST \
       -H "Content-Type: multipart/form-data" \
       -H "Accept: text/html" \
       https://next.nextstrain.org/
     HTTP/2 503
     
     $ curl -i -X POST \
       -H "Content-Type: multipart/form-data" \
       -H "Accept: text/html" \
       https://nextstrain-s-victorlin--3cy38x.herokuapp.com/
     HTTP/1.1 404 Not Found
  • Check if changes affect the resource index JSON revision

Without this, some invalid POST requests would time out or fail with a
500 server error:

    curl -i -X POST \
      -H "Content-Type: multipart/form-data" \
      -H "Accept: text/html" \
      http://localhost:5000/

These now respond with 404 not found.
@victorlin victorlin merged commit 9189d50 into master Feb 24, 2026
10 checks passed
@victorlin victorlin deleted the victorlin/fix-error-routing branch February 24, 2026 17:39
@victorlin victorlin added the bug Something isn't working label Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants