问题
I am using the redirect function in my flask app, but whenever the function triggers it redirects the autogenerated API Gateway domain instead of my own domain, which in turn gives me a message forbidden because it is and was internal url. It works when I run in localhost but as soon as it's AWS it doesn't work. I am using a cloudfront distro to redirect users from http to https.
zappa version: 0.48.2, python: 3.6, zappa_settings.json:
{
"dev": {
"app_function": "application.application",
"aws_region": "eu-north-1",
"profile_name": "default",
"project_name": "root",
"runtime": "python3.6",
"s3_bucket": "example bucket",
"domain": "example.com",
"use_precompiled_packages": true,
"route53_enabled": true
}
}
it should redirect to example.com instead it redirects to auto generated aws link
来源:https://stackoverflow.com/questions/57081932/flask-redirect-function-redirects-to-raw-api-gateway-url-instead-of-custom-domai