Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cssrewrite filter dealing with hostnames.
- Loading branch information
Showing
2 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7d76ec6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain why having the hostname in the urls inside css files is better ? Is it for security reason ?
7d76ec6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I've made a mistake, this should only apply in cases where there is no other option. If file A is on http://foo.org/A.css and file B is on http://bar.org/B.css, then before this fix, it would generate a link like "../bar.org/B.css", which is broken.
7d76ec6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I get it. My bad for not properly reading the doc. I didn't specify the
Environment.url
property, so with django-assets thesettings.PARENT_DOMAIN
is used by default. Setting thesettings.ASSETS_URL
value fixed it.