cancel
Showing results for 
Search instead for 
Did you mean: 

access-control-allow-origin is always wildcard "*" in XSJS

0 Kudos

I want to restrict the origin in XSJS to "https://example.com" but even after tsetting the access-control-allow-origin header in the code I still get wildcard "*" in my response.

I have tried setting the allowedOrigin in mta.yaml file and also tried directly in the .xsjs file

In mta.yaml file:

In .xsjs file:

But my response:

I am unable to understand where I am going wrong.

View Entire Topic
junwu
Active Contributor
0 Kudos

how about

host: "example.com"

0 Kudos

Tried it but still the same issue.

junwu
Active Contributor
0 Kudos

did you remove the code in your xsjs that set the header?

0 Kudos

Yes, But I tried with both (Keeping & Removing)