mirror of
https://github.com/primer/css.git
synced 2024-11-30 19:53:11 +03:00
chore: lint
This commit is contained in:
parent
5bed0029d5
commit
ed34ad1d3f
@ -30,7 +30,10 @@ export default function redirect(uri, status = 303) {
|
||||
}
|
||||
|
||||
export function redirectTrailingSlash(context, status = 301) {
|
||||
const {req: {url}, res} = context
|
||||
const {
|
||||
req: {url},
|
||||
res
|
||||
} = context
|
||||
if (url.endsWith('/')) {
|
||||
const withoutSlash = url.substr(0, url.length - 1)
|
||||
res.writeHead(status, {Location: withoutSlash})
|
||||
|
Loading…
Reference in New Issue
Block a user