Compare commits

..

No commits in common. "3ee936ea5e253a03a02f64cea931c0257fdccb03" and "f079d5a26b79cca252fc5c14576fbe0cd70aef0b" have entirely different histories.

3 changed files with 3 additions and 7 deletions

View file

@ -1,2 +1,2 @@
# Craig's Custom URL Shortener
A simple, versatile URL shortener with a web interface and API. It currently supports short links in the format go.craigg.dev/[slug], although support for more domains will be added soon.
A simple, versatile URL shortener with a web interface and API. It currently supports short links in the format go.craigg.dev/[tag]/[slug] (tag is optional), although support for more domains will be added soon.

View file

@ -36,11 +36,8 @@ async def slug_only(slug: str):
if slug == "favicon.ico":
return HTTPException(404)
else:
if slug in urls["public"].keys():
return RedirectResponse(urls["public"][slug])
else:
return RedirectResponse("/")
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=43599)
uvicorn.run(app)

View file

@ -5,7 +5,6 @@
"public": {
"hc": "https://hackclub.com",
"portfolio": "https://craigg.dev",
"slack-summarizer ": "https://crates.io/crates/slack-summarizer",
"url-shortener": "https://go.craigg.dev"
}
}