Skip to content

How to add CORS #15310

Answered by rzx10r
diegohdez90 asked this question in Q&A
Feb 24, 2021 · 4 comments · 5 replies
Discussion options

You must be logged in to vote

You mean it?

I did a test on your website, suppose that you use phalcon on the api, just put it in response.

$this->response->setHeader('Access-Control-Allow-Origin', '*');
https://docs.phalcon.io/4.0/pt-br/response#headers

You can do with .htaccess, i think is your case.

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@diegohdez90
Comment options

Answer selected by Jeckerson
Comment options

You must be logged in to vote
3 replies
@rzx10r
Comment options

@diegohdez90
Comment options

@rzx10r
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants