Skip to content

Add URL shortner example - #99

Open
ryanking13 wants to merge 1 commit into
mainfrom
gyeongjae/shortner
Open

Add URL shortner example#99
ryanking13 wants to merge 1 commit into
mainfrom
gyeongjae/shortner

Conversation

@ryanking13

Copy link
Copy Markdown
Contributor

It looks like we don't have a good example using workers KV, so I added one.

Comment on lines +36 to +38
code = path.lstrip("/")
if not code or "/" in code:
return error("not found", 404)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we only take the first component of the url here? So that https://thisworker.com/somecode/some/path works?

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

Successfully merging this pull request may close these issues.

2 participants