https://github.com/kodie/redirectmeto
A simple tool for redirecting you.
https://github.com/kodie/redirectmeto
oauth redirect tool
Last synced: 7 months ago
JSON representation
A simple tool for redirecting you.
- Host: GitHub
- URL: https://github.com/kodie/redirectmeto
- Owner: kodie
- License: mit
- Created: 2021-04-16T17:55:04.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T22:22:50.000Z (9 months ago)
- Last Synced: 2025-01-31T22:27:26.898Z (9 months ago)
- Topics: oauth, redirect, tool
- Language: HTML
- Homepage: https://redirectmeto.com
- Size: 8.79 KB
- Stars: 72
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# RedirectMeTo
A simple tool for redirecting you.
https://redirectmeto.com
## Use Case
Let's say you're trying to test a new OAuth connection on your local machine with something like Google but they require the redirect URL to have a domain with an approved TLD (because they don't allow things like `localhost` or `.dev`). You can use a RedirectMeTo url to redirect to your localhost.
## Examples
https://redirectmeto.com/https://www.google.com/search?q=puppies
http://redirectmeto.com/http://localhost:4000/oauth/authorize
http://redirectmeto.com/http://client.dev/page
## How?
Originally, RedirectMeTo was a simple PHP script running on a Digital Ocean droplet that redirected all requests except for the index that displays the homepage. Starting in November 2023 the root path is a static HTML file hosted with GitHub pages and redirects all happen via a CloudFlare worker that is running the following script:
```js
export default {
async fetch(request, env, ctx) {
var url = new URL(request.url)
var redirectUrl = url.pathname.substring(1) + url.search
return Response.redirect(redirectUrl, 307)
}
}
```This allows for RedirectMeTo to run indefinitely for zero cost (except for the domain) and zero maintenance (serverless).
## License
MIT. See the [license.md file](license.md) for more info.