How to pass multiple AllowOrigin

Viewed 9

I'm trying to pass multiple origins comma separared and it fails. If I pass only one it works. Also if I pass * it works... What is the issue here?? How can I pass multiple values to AllowOrigin? I cannot use *

sec:SecretString:ALLOWED_ORIGINS = http:/localhost:8080,http://localhost:9090

  RestApi:
    Type: AWS::Serverless::Api
    Properties:
      StageName: myStage
      Cors:
          AllowOrigin: '{{resolve:secretsmanager:/secret/sec:SecretString:ALLOWED_ORIGINS}}'
          AllowMethods: "'DELETE,GET,POST,PUT'"
          AllowHeaders: "'Authorization, Content-Type'"
          AllowCredentials: true
          MaxAge: "'3600'"
0 Answers
Related