Fix shortUrl in result
This commit is contained in:
parent
9e34fb15e6
commit
91111acfcf
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ const app = new Hono<Env>()
|
|||
app.use('*', async (c, next) => {
|
||||
const path = new URL(c.req.url).pathname
|
||||
let key = path !== '/' ? path.replace(/\/$/, '') : path
|
||||
let shortUrl = new URL(key, c.req.url).origin
|
||||
let shortUrl = new URL(key, c.req.url).toString()
|
||||
|
||||
c.set('path', path)
|
||||
c.set('key', key)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue