diff --git a/responses/responses.go b/responses/responses.go index 6f9fd87b25f700367f38d7a9b742386c28b7aeb8..c19d8299ad6aa0e0a3791ea9f8e4883755af2241 100644 --- a/responses/responses.go +++ b/responses/responses.go @@ -131,3 +131,10 @@ func FoundResponse(url string) events.APIGatewayProxyResponse { Headers: map_utils.MergeMaps(utils.CorsHeaders(), map[string]string{"Location": url}), } } + +func TemporaryRedirectResponse(url string) events.APIGatewayProxyResponse { + return events.APIGatewayProxyResponse{ + StatusCode: http.StatusTemporaryRedirect, + Headers: map_utils.MergeMaps(utils.CorsHeaders(), map[string]string{"Location": url}), + } +}