直接访问域名返回404。在KV中设置一个entry,保存秘密path,只有访问这个path才显示使用页面。
https://zelikk.blogspot.com/2022/07/url-shorten-worker-hide-tutorial.html
支持自定义短链
https://zelikk.blogspot.com/2022/07/url-shorten-worker-custom.html
API 不公开服务
https://zelikk.blogspot.com/2022/07/url-shorten-worker-api-password.html
页面缓存设置过的短链
https://zelikk.blogspot.com/2022/08/url-shorten-worker-localstorage.html
长链接文本框预搜索localStorage
https://zelikk.blogspot.com/2022/08/url-shorten-worker-bootstrap-list-group-oninput.html
增加删除某条短链的按钮
https://zelikk.blogspot.com/2022/08/url-shorten-worker-delete-kv-localstorage.html
https://zelikk.blogspot.com/2022/07/url-shorten-worker-hide-tutorial.html
A URL Shortener created using Cloudflare Worker
Go to Workers KV and create a namespace.
Bind an instance of a KV Namespace to access its data in a Worker.
Where Variable name should set as LINKS
and KV namespace is the namespace you just created in the first step.
Copy the index.js
code from this project to Cloudflare Worker.
Click Save and Deploy
Note: Because someone abuse this demo website, all the generated link will automatically expired after 24 hours. For long-term use, please deploy your own.
注意:所有由Demo网站生成的链接24小时后会自动失效,如需长期使用请自行搭建。