Question

I have the challenge that I want my site to be cache-able by and external varnish cache provider.

Most of my page gets cached nicely, but elements like the ico file, images and css are written with the full url in code and hence doesn't use the cached version.

www.domain.com points to internal.domain.com

When I go to www.domain.com the urls for the images looks like this

http://internal.domain.com/sites/default/files/styles/hero_full/public/hero/image.jpg?itok=WiCUbqbj

What I wanted was that it just wrote a url relative to the root of the site.

/sites/default/files/styles/hero_full/public/hero/image.jpg?itok=WiCUbqbj

The issue is the same with files included from the THEME.libraries.yml file.

Was it helpful?

Solution

Core actually did exactly that change just a few days ago, it will be like that in 8.0.3.

That said, your set up looks problematic to me, that's not going to be the only thing that somehow relies on the domain name. Usually the same domain is used?

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top