smollweide / node-mock-server

File based Node REST API mock server
MIT License
255 stars 65 forks source link

[question] options.accessControlAllowOrigin (and others) not send when using middleware #170

Open chrisovergaauw opened 3 years ago

chrisovergaauw commented 3 years ago

Hi,

I'm running into CORS issues due to the fact that all the required headers are missing when using the documented example:

middleware: { ... requestOptions.res.end(data) ... }

adding requestOptions.res.headers nor serverOptions.headers worked.

How do you deal with this properly?