Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I made some changes to the
v1
branch on my fork over here https://github.com/pudgereyem/micro-cors/tree/v1.You can take a look at all changes by looking at the PR's in my fork.
fix: update development dependencies - pudgereyem#1
async-to-gen
in favor of @babel/plugin-transform-runtimefix: remove build script - pudgereyem#2
We don't need to build this project, so this removes the build script and changes the main file to be
src/index.js
. This was previously discussed in this issue.fix: set headers before calling handler - pudgereyem#3, pudgereyem#4
micro-cors
have to set all the headers before calling the handler, since the handler otherwise would end the request. If the user wants to set any headers in their own handler they have to deal with any overrides, as described in more depth here; pudgereyem#4