cancel
Showing results for 
Search instead for 
Did you mean: 

SnapLogic API CORS policy (enable try me) disabled still CORS error in api portal

JensDeveloper
Contributor II

Hi,

I’m trying to acces my data through a get request with an API key as an Authorization. I disabled the checkbox Enable try me button to override the default CORS restriction policy to not use CORS.
image

In the API manager I have applied two policies:
image
Authorize by Role is mandatory (said in documentation to authenticate the api caller correctly)

But when I do the call in the API portal of Snaplogic (with the API key authorization) I still get the CORS error.
image
Because I checked the console also and it is a CORS error.
image

Is there somewhere still CORS enabled in SnapLogic?
When I test it in Postman with the API Key it works correctly

But when I use the policies:

  • Authorize by role
  • anonymous Authenticator
    so you need no Authorization and I can acces the data from the API portal. But then there is no security…

Regards

Jens

1 REPLY 1

JensDeveloper
Contributor II

Hi,

I finally found the error. So apparantly in the default CORS settings the header ‘authorization’ is not included in the acces control headers request so I needed to override the CORS policy with my own.

image

I will close this topic in two days