Skip to content

Commit

Permalink
server: remove man.dvc.org redirect path replace exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel committed Jan 14, 2020
1 parent c88d436 commit 44fe426
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ app.prepare().then(() => {
res.writeHead(301, {
'Cache-Control': 'no-cache',
Location:
'https://dvc.org/doc/command-reference' +
// replace - for / in {cmd} except for get-url, import-url
(['/get-url', '/import-url'].indexOf(pathname) < 0
? pathname.replace('-', '/')
: pathname)
'https://dvc.org/doc/command-reference' + pathname.replace('-', '/')

This comment was marked as resolved.

Copy link
@shcheklein

shcheklein Jan 14, 2020

Member

so, no need to replace anything at all.

})
res.end()
} else if (/^(code|data|remote)\.dvc\.org$/.test(req.headers.host)) {
Expand Down

0 comments on commit 44fe426

Please sign in to comment.