-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically add OPTIONS action #59
Conversation
… override OPTIONS from api blueprint.
Awesome thanks for the PR 👍 I'll have a look and make comments |
@@ -69,6 +69,12 @@ By default a CORS header is sent, you can disable it with the --disableCORS swit | |||
|
|||
`drakov -f "../com/foo/contracts/*.md" --disableCORS` | |||
|
|||
## Automatic response to OPTIONS requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge thank you for updating the README 👍 🎱
Nice work 👍 A very well documented and tested PR 🎱 |
Bringing this again to the top, will review this again for possible release in 0.1.8 |
Merging |
Automatically add OPTIONS action
Dont have time for that refactoring I promissed in #59 (comment) :-( |
@MartinNuc don't worry too much about it :) It's great to get this feature out to the people using Drakov. At this stage I'm ok with the code structure, which can evolve in the future 🎱 |
When creating server based on API blueprint I wanted to use AngularJS against drakov as a basic mocking server.
First I allowed CORS headers (including HEADERS for POST requests):
After I would have to add OPTIONS action for every route so CORS prefight is successful.
Therefore I made slight changes to drakov to add OPTIONS action where it's missing. This is being turned on using flag
--autoOptions