Sub-path Site / Domain Masking fixed CSS/JS URLs without varying by url.site cache context

Created on 17 January 2024, over 1 year ago

Problem/Motivation

For single site installation where they are accessed through a domain (blog-server.host.com), and as sub-path (www.host.com/blog) through custom routing/reverse proxy/domain masking, aggregated CSS/JS file are generated from whichever URL was accessed first.

This means, when access the site from the direct host (blog-server.host.com), assets are loaded as `blog-server.host.com/blog/css/xxxx` if the files were generated from www.host.com/blog. It can also happen vice versa.

In previous installations, we setting the url.site cache context fixes this, but this time it is not helping.

This was initially discovered from this issue:
https://www.drupal.org/project/drupal/issues/3354204 🐛 [regression] Since #1014086 generated CSS assets have absolute URLs without varying by url.site cache context Fixed

Steps to reproduce

Proposed resolution

Option to generate alternate Aggregate assets URLs based on cache context

Merge request link

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.1

Component
Asset library 

Last updated 1 day ago

No maintainer
Created by

🇵🇭Philippines eabquina Manila

Live updates comments and jobs are added and updated live.
  • Regression

    It restores functionality that was present in earlier versions.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024