Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Check URL before submit if exist #20

Open
erolj opened this issue Nov 21, 2021 · 3 comments
Open

[Request] Check URL before submit if exist #20

erolj opened this issue Nov 21, 2021 · 3 comments

Comments

@erolj
Copy link

erolj commented Nov 21, 2021

Hello,
I have a user who keeps abusing the site by submitting a specific URL multiple times each day.
How can I check the URL before submitting if it already exists or not, and simply showing an error message "URL has been submitted before. Check this URL: http://shorten.li/bHNv1P" ??

Thank you.

@xyTom
Copy link
Owner

xyTom commented Nov 26, 2021

Thank you for your suggestion. This feature is on the plan, but I haven't finished it yet because I've been busy these days. I hope that I am able to complete the feature in late December, so stay tuned!

xyTom added a commit that referenced this issue Feb 25, 2022
@xyTom
Copy link
Owner

xyTom commented Feb 25, 2022

This feature has been added, but is turned off by default, as turning it on will increase kv quota consumption. If you need to use this feature, make sure to change config.unique_link=true in index.js.

unique_link:false,//If it is true, the same long url will be shorten into the same short url

@ngdbao
Copy link

ngdbao commented Sep 27, 2022

This feature has been added, but is turned off by default, as turning it on will increase kv quota consumption. If you need to use this feature, make sure to change config.unique_link=true in index.js.

unique_link:false,//If it is true, the same long url will be shorten into the same short url

Hi,
Thanks for you work
I have a question, how can this feature increase KV quota consumption? I though It would lower the write consumtion

RuioWolf added a commit to RuioWolf/Url-Shorten-Worker that referenced this issue Nov 23, 2022
* Update API.md (xyTom#27)

* Update README.md

* Create API_zh-hans.md

* Update API.md

* Check URL before submit if exist xyTom#20

* Added params variable and added params to redirect location if available. (xyTom#30)

Co-authored-by: David <davvido51gmail.com>

* Add Google Safe Browsing feature.

Using the Google Safe Browsing API (https://developers.google.com/safe-browsing) v4 to check the URL is safe or not before redirect.

* Update Demo Website

Co-authored-by: Casperteam <[email protected]>
Co-authored-by: xyTom <[email protected]>
Co-authored-by: dras51 <[email protected]>
xyTom added a commit that referenced this issue Aug 12, 2023
* Create index.js

* Update README.md

* Update README.md

* Fix Bug: Add check for duplicate Random_Key

添加对Random_Key 是否重复的检查,防止恰好生成了相同的6位随机字符串,之前的 URL 就被替换的情况发生
完善对URL合法性的检查

* fix: small error (#1)

* Update index.js (#4)

if 嵌套的等效写法

* Update 404 page

* Add CORS support (#6)

* Add CORS support #6

* Update index.js (#9)

* Update README.md

* Update README.md

* Update README.md

* Add API document (#13)

* Add API document

This is the API document for Url-Shorten-Worker.

* Update README.md

* Update README.md

* Add custom theme, hide Referer header and cors setting #16

Add a config which allow you to customize some behaviour of the Url-Shorten-Worker. You can set custom theme by modify the config.theme. There are two theme you can choose default and urlcool. Set config.theme to "theme/urlcool" to use the urlcool theme. Leave the config.theme to be blank to use the default theme. Also you can use config to control the CORS behaviour and HTTP Referer header.

* Update README.md

* Update index.js

Fix some issues

* Update API.md (#27)

* Update README.md

* Create API_zh-hans.md

* Update API.md

* Check URL before submit if exist #20

* Added params variable and added params to redirect location if available. (#30)

Co-authored-by: David <davvido51gmail.com>

* 修改为自用

直接访问域名返回404。在KV中设置一个entry,保存秘密path,只有访问这个path才显示使用页面。

* Update README.md

* Update index.js

* Update README.md

* 不检查url格式

* Revert "不检查url格式"

This reverts commit 60f2d7e.

* Update index.js

* main.js 搬回github

* custom_link:true

* Update README.md

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update index.js

* Update README.md

* Update README.md

* Update README.md

* localStorage

* Update README.md

* cmd-del

* 1

* Update README.md

* zelikk 302

* Update README.md

* Update README.md

* Update README.md

* Update README.md

---------

Co-authored-by: xyTom <[email protected]>
Co-authored-by: 0xflotus <[email protected]>
Co-authored-by: 管子工具箱 <[email protected]>
Co-authored-by: Cetacea <[email protected]>
Co-authored-by: cloudtom <[email protected]>
Co-authored-by: Casperteam <[email protected]>
Co-authored-by: dras51 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants