Skip to content

Conversation

@balamurali27
Copy link
Contributor

@balamurali27 balamurali27 commented Nov 12, 2025

fixes #305

When users make requests to http endpoint instead of https (webhooks), the request body gets dropped. Using 308 prevents that.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates nginx redirect status codes from 301 to 308 to preserve HTTP request methods and bodies during redirects. This ensures that POST requests with payloads are not converted to GET requests when redirecting.

  • Changed host-based redirects from 301 to 308
  • Changed HTTP-to-HTTPS redirects from 301 to 308

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

server_name _;

location ^~ /.well-known/acme-challenge/ {
return 301 http://ssl.{{ domain }}$request_uri;
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with the PR's goal of preserving request bodies on redirects, this ACME challenge redirect should also be changed from 301 to 308. While ACME challenges typically use GET requests, using 308 maintains consistency with the other permanent redirects in this configuration and follows the same principle of preserving request methods.

Suggested change
return 301 http://ssl.{{ domain }}$request_uri;
return 308 http://ssl.{{ domain }}$request_uri;

Copilot uses AI. Check for mistakes.
@phot0n
Copy link
Member

phot0n commented Nov 17, 2025

#305 - thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: use get instead of post - to avoid dropping of request data when encountering a redirect

3 participants