Skip to content

Commit

Permalink
Allow setting empty path in url rewrite. (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanpf authored Oct 9, 2023
1 parent eff2710 commit 3806e78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pjs/filter/url-rewrite.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

makeHeadHandler = (path, cfg) => (
(cfg?.Path?.Type === 'ReplacePrefixMatch') ? (
cfg?.Path?.ReplacePrefixMatch && (
(cfg?.Path?.ReplacePrefixMatch !== undefined) && (
head => (
head?.path?.length > path.length ? (
head.path = resolvPath(cfg.Path.ReplacePrefixMatch) + head.path.substring(path.length)
Expand All @@ -45,7 +45,7 @@
)
) : (
(cfg?.Path?.Type === 'ReplaceFullPath') ? (
cfg?.Path?.ReplaceFullPath && (
(cfg?.Path?.ReplaceFullPath !== undefined) && (
head => (
(
prefix = (head?.path || '').split('?')[0],
Expand Down

0 comments on commit 3806e78

Please sign in to comment.