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

Explicitly list acceptable request headers in CORS response #60

Merged
merged 1 commit into from
Dec 19, 2022

Conversation

mbklein
Copy link
Contributor

@mbklein mbklein commented Dec 19, 2022

  • Refactor middleware into a single function wrapper to DRY up handlers
  • Give test helper explicit access to processRequest for use in setup
  • Remove some unused requires

It was my intention to wrap handlers like:

module.exports.handler = wrap(
  async (event) => {
    // ... handler code
  }
);

because I thought it called more attention to the fact that the function was being wrapped. But prettier preferred

module.exports.handler = wrap(async (event) => {
  // ... handler code
});

@mbklein mbklein requested a review from kdid December 19, 2022 18:48
@mbklein mbklein marked this pull request as draft December 19, 2022 18:54
Refactor middleware into a single function
Give test helper explicit access to processRequest
Remove some unused requires
@mbklein mbklein force-pushed the 3414-send-explicit-cors-headers branch from 1be5d40 to 14eefd6 Compare December 19, 2022 19:09
@mbklein mbklein temporarily deployed to test December 19, 2022 19:09 — with GitHub Actions Inactive
@mbklein mbklein marked this pull request as ready for review December 19, 2022 19:09
@mbklein mbklein merged commit b7dc2b0 into deploy/staging Dec 19, 2022
@mbklein mbklein deleted the 3414-send-explicit-cors-headers branch December 19, 2022 19:56
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.

2 participants