How to check for FileTypes and set the Cors origin

Not applicable
HI, Am trying to check for Filetypes and then set the headers for Cors Origin . Can you please help me here .
0 3 367
3 REPLIES 3

Not applicable
Want to achieve the following : <FilesMatch "\.(eot|otf|ttf|woff)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch>

Your question is somewhat unclear, > do you want to set the cors origin header for your browser client? - it is not possible, browsers wont let you do that > do you want to verify filetype and set the 'Access-Control-Allow-Origin' response header in Apigee? - it is possible, you can access the request headers, params within apigee using predefined variables like [request.queryparam.. , request.header..] or using Extract Variables and you could use either Javascript or conditions to evaluate the filetypes and set the response headers accordingly How to implement CORS has been discussed several times in the community, https://community.apigee.com/search.html?f=&type=q... you would find some samples on how to do it, Thanks, Mukundha

Thanks . Yes , I want to verify Filetypes and then set the header . Will try with Javascript