Ghost/core/server
Fabien O'Carroll c5b8dab523 🐛 Fixed custom redirects for subdirectory setups
no-issue

This issue only occurs when using custom redirects with a subdirectory
setup, and the path to be redirected from is expressed as a regex, and
the url that is being redirected to is not an external url.

The issue has a few components:

- Redirect paths as a regex generally use the ^ to ensure that they
  match the beginning of the path.

- The path that the regex is matched against conditionally excludes the
  subdirectory, specifically, the subdirectory is excluded for external
  urls

These combined means you end up with a regex like /^\/custom-redirect/
and a path like /subdir/custom-redirect, these will not match/replace
correctly, and you'll end in an infinite redirect loop.

The fix here is to *always* remove the subdirectory when testing regex's
and then conditionally adding it back *only* for the redirect, and only
if it is an internal redirect
2020-06-16 10:24:13 +02:00
..
adapters Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
api 🐛 Fixed fallback to bookmark card when pasting localhost Ghost url 2020-06-15 18:38:43 +01:00
data Removed "from address" overwrite in importer (#11914) 2020-06-15 12:22:55 +05:30
lib Added imageOptimization:srcsets config to allow disabling of srcset attrs in content 2020-06-15 16:45:36 +01:00
models Added ?force_rerender=true param to posts edit endpoint 2020-06-12 18:05:57 +01:00
public Renamed members ssr + api endpoints 2020-04-30 19:00:37 +01:00
services 🐛 Fixed missing text version in bulk email (#11919) 2020-06-15 15:31:09 +01:00
translations Added invalid import record errors and counts 2020-06-12 19:59:36 +12:00
views Update default 404 page 2019-07-15 14:47:01 +02:00
web 🐛 Fixed custom redirects for subdirectory setups 2020-06-16 10:24:13 +02:00
analytics-events.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
ghost-server.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
index.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
overrides.js Disabled bluebird debug logs 2018-08-13 14:01:31 +02:00
update-check.js Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00