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

Add enhancements to sitemap route handling #497

Merged
merged 2 commits into from Feb 11, 2019
Merged

Conversation

impactmass
Copy link
Contributor

Resolves NA
Impact: minor
Type: feature+refactor

Changes

During an internal PR review, some refactor + updates were suggested that I'm adding here:

  • Switch fetch().then.catch() to async/await
  • Bubble up 404 and 500 errors to the error middleware and let them be handled there
  • Add Cache-Control header to cache the sitemap. With max-age default of 12 hours.
  • Use express route pattern matching

Testing

Testing should be same as the original PR found here #488. You can use reaction's develop branch.

…ch promise

Signed-off-by: Seun Martins <seundotme@gmail.com>
Signed-off-by: Seun Martins <seundotme@gmail.com>
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates look good

@kieckhafer kieckhafer merged commit 37e3b7f into develop Feb 11, 2019
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 5, 2019
@machikoyasuda machikoyasuda deleted the impactmass-patch1 branch August 29, 2019 20:42
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.

None yet

2 participants