Sink provides some configuration options, which can be referred to in .env.example.
Sets the site to demo mode, the generated links will expire after 24 hours, and the links cannot be edited or deleted.
Sets the default length of the generated SLUG.
Redirects default to use HTTP 301 status code, you can set it to 302
/307
/308
.
The default Sink homepage is the introduction page, you can replace it with your own website.
The Analytics Engine DATASET, it is not recommended to modify unless you need to switch databases and clear historical data.
You can modify the large model yourself. The supported names can be viewed at Workers AI Models.
Supports custom prompts, it is recommended to keep the placeholder {slugRegex}.
Default prompt:
You are a URL shortening assistant, please shorten the URL provided by the user into a SLUG. The SLUG information must come from the URL itself, do not make any assumptions. A SLUG is human-readable and should not exceed three words and can be validated using regular expressions {slugRegex} . Only the best one is returned, the format must be JSON reference {"slug": "example-slug"}