Skip to content

allowing CORS in AWS Lambda #294

@ciskoh

Description

@ciskoh

I am trying deployment on aws lambda with zappa following the tutorial. I need to enable CORS for tiles and apparently this is not working.

I have edited zappa_settings as follows:

[development.aws_environment_variables]   
    TC_DRIVER_PATH = "s3://xxx-xxx-xxx/xx.sqlite"
    TC_DRIVER_PROVIDER = "sqlite-remote" 
    TC_REPROJECTION_METHOD = "linear"
    TC_RESAMPLING_METHOD = "average"
    TC_XRAY_PROFILE = "true" 
    TC_ALLOWED_ORIGINS_TILES = '["*"]'

However when I do terracotta connect {address of lambda} I still cannot see any image and through the developer tool I see an error:

Access to fetch at 'xxxx' from origin 'http://127.0.0.1:5100' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Is there anything extra I have to set up on the api gateway or lambda configuration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions