Skip to content
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

Enables CORS, resolves mmalecki/hock#30 and adds a clearRoutes method #31

Closed
wants to merge 6 commits into from

Conversation

yzhan94
Copy link

@yzhan94 yzhan94 commented Jan 24, 2017

Enable CORS (Cross-Origin Resource Sharing)

Add CORS Headers to all responses and always accepts HTTP OPTIONS requests in order to work with XHR requests, e.g.: testing an Angular app with Protractor.

Match routes when Request body is undefined

Resolves issue #30, matching routes regardless the request body content when the route definition didn't specify a body.
Specifying a body on route definition should still match correctly as long as it's specified first.

Clear defined routes

In order to avoid routes overmatching the number of requests, I have added a clearRoutes to the Hock class which clears the defined routes.

@yzhan94
Copy link
Author

yzhan94 commented Jan 22, 2018

Closing for lack of interest

@yzhan94 yzhan94 closed this Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant