Options Request - How to Setup #2188
-
Drogon is amazing, thank you for this. I'm struggling to get OPTIONS request handling to work. I tried to set up an OPTIONS method using ADD_METHOD_TO similar to other methods, but I couldn't get it to work. Looking at the source code I see OPTIONS seems to be handled by the system / done automatically perhaps. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi Paul.
Instead of registerPostHandlingAdvice you can also add the response headers to each individual response. If you need credentials remember to add them and set headers as needed. |
Beta Was this translation helpful? Give feedback.
-
Hi alwaysvitorious. Thank you for this answer. I'm grateful for your time and effort. I have it working now and have learnt more about Drogon. Many thanks |
Beta Was this translation helpful? Give feedback.
Hi Paul.
I found the best solution to manage all OPTIONS requests from main.cc: