caalberts / localroast

Mock a server for development and testing
MIT License
227 stars 23 forks source link

Possible to add a access control allow origin header? #11

Closed jenseo closed 4 years ago

jenseo commented 5 years ago

Hi there, I have experimented some with your wonderful application, but have an issue that I would like to take up for discussion.

I'm trying to use localroast for mocking API data for one of my applications on localhost, but unfortunately when running it I get a CORS error.

Would it be possible to implement an access control allow origin header? Something like this:

Access-Control-Allow-Origin: *

This would make it possible to use it to mock data in an application running on a different localhost port.

Thanks in advance!

caalberts commented 4 years ago

@jenseo This is now implemented in v0.4.0. I hope it helps.