From 4f4a633035412fd1d5bcf354fc0a14240c934e3a Mon Sep 17 00:00:00 2001 From: nitezs Date: Sun, 17 Sep 2023 16:20:15 +0800 Subject: [PATCH] fix --- api/controller/short_link.go | 2 +- api/templates/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/controller/short_link.go b/api/controller/short_link.go index ae5035d..ddd1c32 100644 --- a/api/controller/short_link.go +++ b/api/controller/short_link.go @@ -46,5 +46,5 @@ func ShortLinkGetHandler(c *gin.Context) { c.String(404, "未找到短链接") return } - c.Redirect(302, "/"+shortLink.Url) + c.Redirect(302, "../"+shortLink.Url) } diff --git a/api/templates/index.html b/api/templates/index.html index 9cb3a4b..8c63925 100644 --- a/api/templates/index.html +++ b/api/templates/index.html @@ -298,7 +298,7 @@ function generateShortLink() { const apiShortLink = document.getElementById("apiShortLink"); - axios.post("/short", { + axios.post("./short", { "url": generateURI() }, { headers: {