pantheon-systems / pantheon_domain_masking

Domain Masking helper module for D8
GNU General Public License v2.0
11 stars 6 forks source link

Redirect URLs from platform domain if the subpath are hardcoded or cached #32

Open eabquina opened 9 months ago

eabquina commented 9 months ago

Background: As discovered with Drupal 10, a regression is found that causes CSS and JS aggregated URLs have a fixed URL path and is not affected by cache contexts: https://www.drupal.org/project/drupal/issues/3354204,

As a workaround for this issue, we apply a workaround in the target subpath site to redirect URLs if the sub-path site is detected when accessing the platform domain URL

With this, we also apply a solution for potential URLs where the subpath was added incorrectly to via content or caching

Note: There is a special counterpart AGCDN configuration that is done by Pantheon to apply a similar redirect when URLs are also missing the subpath prefix but it was actually a CSS or JS file rendered from a subpath site.