Allow for external redirects
See original GitHub issueI have a use case where I need to redirect offsite, the only way to get this to work currently is to disable routing rules in the plugin config and set them up myself.
I suggest we check if the toPath
is a valid URL, and if true, stop prepending the hostname & protocol plugin options.
-
~Redirect objects:~
- ~Validate if
toPath
is a valid URL~ - ~If true: don’t prepend the base var https://github.com/jariz/gatsby-plugin-s3/blob/676cd3f7b884085f50226420eca2bb1bd6b40725/src/bin.ts#L249~
- ~Validate if
-
Routing rules:
- Validate if
toPath
is a valid URL - Parse URL
- Use parsed hostname & protocol to override the plugin options.
- Validate if
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Manage Redirects to External URLs - Salesforce Help
Under External Redirections, in the Allow redirections to untrusted external URLs field, specify the desired behavior when a user clicks an untrusted external...
Read more >External redirected URLs - Sitebulb
External redirected URLs. This means that the URL in question is an external URL that redirects to another external URL.
Read more >Reason: CORS request external redirect not allowed - HTTP
The CORS request was responded to by the server with an HTTP redirect to a URL on a different origin than the original...
Read more >Internal vs External URL redirection - CodeGuage
In external redirection the browser and user all know that one URL was redirected to another. In technical terms, unlike internal redirection, ...
Read more >External Redirect - OWASP ZAP
' Use an allow list of approved URLs or domains to be used for redirection. Use an intermediate disclaimer page that provides the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@stonehz Yep, it says so in the issue description that routing rules do not support it at the moment. So, a workaround is setting
generateRedirectObjectsForPermanentRedirects
totrue
for now.Fixed by #94