aws / apprunner-roadmap

This is the public roadmap for AWS App Runner.
https://aws.amazon.com/apprunner/
Other
292 stars 13 forks source link

Allow changing status code of HTTP->HTTPS redirect #231

Open zetkajot opened 5 months ago

zetkajot commented 5 months ago

Community Note

Tell us about your request I want to be able to set status code of http to https redirect response to 308 Permanent Redirect - currently AppRunner handles this redirection by sending 301 Moved Permanently.

In my case, where I host REST API using AppRunner without custom domain assigned, some of the clients use HTTP clients that on receiving 301 Moved Permanently status code change request method to GET as mentioned in RFC9110. When given endpoint accepts only POST requests, it causes confusion for the client's operator that must be resolved by manually contacting them and informing about the need to use https endpoints explicitly.

Status code 308 Permanent Redirect does not allow changing method to GET and using it would solve my issue. However, taking in account that this status code was introduced relatively recently and using it by default may cause unexpected behaviour for some clients, I suggest that if this feature were to be introduced, it should be an optional choice.

Describe alternatives you've considered It could be possible to use Lambda@Edge to handle custom redirection, but it involves additional complexity and costs.

Additional context N/A

Attachments N/A