Hi there! I'm trying to use fs-router but am having problems with needing to set up an OPTIONS route. Some more details.
I've used fs-router to set up a POST route at /sync. I've used micro-cors to set up cors. However when I send a request from my client, I see a 404 at OPTIONS /sync. This is because the browser sends an OPTIONS preflight request to the server first.
I think the solution would be to set up an OPTIONS handler as well, but I'm not sure what to do there. Have you ever encountered this problem, or do you have any other suggestions for doing cors with fs-router?
Hi there! I'm trying to use fs-router but am having problems with needing to set up an
OPTIONSroute. Some more details.I've used
fs-routerto set up aPOSTroute at/sync. I've used micro-cors to set up cors. However when I send a request from my client, I see a 404 atOPTIONS /sync. This is because the browser sends anOPTIONSpreflight request to the server first.I think the solution would be to set up an
OPTIONShandler as well, but I'm not sure what to do there. Have you ever encountered this problem, or do you have any other suggestions for doing cors withfs-router?