mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
🐛Fixed slugs containing the word amp
result in 404s when serving the amp version (#9722)
closes #9715 - changed the `urlWithoutSubdirectoryWithoutAmp` variable in the amp router to only match /amp or /amp/ at the end of the url string, instead of just matching any occurrence of /amp in the url string
This commit is contained in:
parent
742eed99bd
commit
541713d73f
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ function _renderer(req, res, next) {
|
|||
function getPostData(req, res, next) {
|
||||
req.body = req.body || {};
|
||||
|
||||
const urlWithoutSubdirectoryWithoutAmp = res.locals.relativeUrl.match(/(.*?\/)amp/)[1];
|
||||
const urlWithoutSubdirectoryWithoutAmp = res.locals.relativeUrl.match(/(.*?\/)amp\/?$/)[1];
|
||||
|
||||
/**
|
||||
* @NOTE
|
||||
|
|
Loading…
Add table
Reference in a new issue