Open masious opened 8 years ago
You have to add sending it from your server manually. In which language your server is written? For example if you're using .net with web .api there is nice tutorial: http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api
@Laureian The server is liteserver...
@masious Did you ever find an answer for this? How to set the lite-server headers? I feel like it might be part of bs-config but I can't find the option.
Create a file called bs-config.json
in your working directory and it should have cors
key set to true
.
{
"cors": true
}
Restart lite-server
and it should work.
As of Firefox 107.0.1, the method of setting bs-config.json is not working but perhaps it's the issue of Firefox since Chrome 108.0.5359.94 does not have this issue when "cors" is set.
So, if anyone encounter this issue on Firefox in your development, consider using a more permissive browser as well when you have no clue why CORS problem persists
Hi. I want to communicate with another server. Is there a way so that I can send
Access-Control-Allow-Origin: *
header to my client?