yillkid / iota-swarm-node

IOTA Swarm node Reference Implementation
Other
12 stars 9 forks source link

Fix CORS problem #14

Closed HexRabbit closed 6 years ago

HexRabbit commented 6 years ago

In order to not violate CORS regulation on web browser,"Access-Control-Allow-Origin: *" header needs to be set while responding to client's POST request. And before POST request, there's an another OPTION request called preflight request [1], the same header above also needs to be set while responding to this kind of request.

[1] https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request

HexRabbit commented 6 years ago

Updated.