A fun project for Cloudflare Summer Challenge to create Shady URLs. Go to https://shadyurls.shriji.workers.dev/ to have fun.
A simple POC of cloudflare worker that uses the potential of KV, a reverse of this project would be a URL shortner service.
Configure your toml
file to bind KV namespace. This project uses SHADYURL
If you plan on forking this, then check.
Send a post with body json request to https://yourdomain.worker.dev/
it will respond back with a longass URL.
{
"url":"https://github.com"
}
{
"result": {
"target": "https://github.com",
"shadykey": "Lark_Jay_Ostrich_Okapi_Oryx_Chough_Leopard_Eagle_Dunlin_Bat",
"shadyUrl": "https://url-longener.shriji.workers.dev/post/Lark_Jay_Ostrich_Okapi_Oryx_Chough_Leopard_Eagle_Dunlin_Bat"
}
}
Query https://yourdomain.worker.dev/query/<verysillylongurl>
will return what the longass URL is.
{
"result": "https://google.com"
}
Go to https://yourdomain.worker.dev/<verysillylongurl>
will redirect to target URL.
- URLs may collide, there isn't a mechanism for detecting collisions.
- As of now this uses animals from
animals.json
chooses 10 animals seperated by_
. - May add silly words and words that make you wash your mouth.