aws / aws/apprunner-roadmap

Allow changing status code of HTTP->HTTPS redirect

Open
#231 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
301
Forks
15
PR merge metrics
No merged PRs in 30d

Description

**Community Note**
* Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do * not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

**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](https://www.rfc-editor.org/rfc/rfc9110#name-301-moved-permanently). 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.