Repository navigation
Conversation
This changes enable Cross-Origin Resource Sharing (CORS) as requested in here : OpenLightingProject#1547
peternewman
left a comment
There was a problem hiding this comment.
Hi @GertOdB,
You can switch to the existing constant MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN so you don't need to write it out by hand:
https://git.gnunet.org/libmicrohttpd.git/tree/src/include/microhttpd.h#n846
There was a problem hiding this comment.
So just in terms of covering all the bases, this header was added in https://git.gnunet.org/libmicrohttpd.git/commit/src/include/microhttpd.h?id=fe4fa4d3c2f47197da462fedbbd3aa364fab2279 which was on 2013-09-18 . That's probably long enough ago we can just get away with it, if someone sticks an issue in, we can add some cotton wool to fall back.
It would probably be nice to add a wrapper function like set no cache:
ola/common/http/HTTPServer.cpp
Lines 369 to 374 in d101097
It's fine to merge as is, but this would make it just a bit better if you're happy to do the changes @GertOdB ?
|
Closing this in favour of #1625 |
This enables Cross-Origin Resource Sharing (CORS) as requested in here : #1547