gatsby-uc/gatsby-plugin-s3

Add support for force and statusCode on redirects

Open

#67 opened on May 25, 2019

View on GitHub
 (0 comments) (1 reaction) (0 assignees)TypeScript (104 forks)github user discovery
enhancementgood first issuepriority: low

Repository metrics

Stars
 (206 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

According to the documentation for createRedirect, some plugins support the non-standard redirect parameters force and statusCode. It might be nice for us to support these too.

With Redirection Rules, we can support force by adding/removing the HttpErrorCodeReturnedEquals: '404' condition. We can support statusCode by overriding the HttpRedirectCode redirect value.

With redirect objects (#64) we can support force by choosing whether to upload the content object or the redirect object in the event of a conflict. This would require a bit of a change to the upload logic. It's not possible to use redirect objects for anything other than 301, so they would have to still be handled by Redirection Rules.

Contributor guide