mirror of
https://github.com/primer/css.git
synced 2024-12-02 16:13:02 +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) {
|
export function redirectTrailingSlash(context, status = 301) {
|
||||||
const {req: {url}, res} = context
|
const {
|
||||||
|
req: {url},
|
||||||
|
res
|
||||||
|
} = context
|
||||||
if (url.endsWith('/')) {
|
if (url.endsWith('/')) {
|
||||||
const withoutSlash = url.substr(0, url.length - 1)
|
const withoutSlash = url.substr(0, url.length - 1)
|
||||||
res.writeHead(status, {Location: withoutSlash})
|
res.writeHead(status, {Location: withoutSlash})
|
||||||
|
Loading…
Reference in New Issue
Block a user