Updates to handle linked relative resources when using CDNJS local cache option. #92
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
experiment
suggestion
support
Testing
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/framework#92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Say we cache resources locally using the CDNJS view helper and one of these resources is a CSS file that links to another resource using a relative URL, such as a font file using an
@import
call or PNG image file using aurl()
method. The browser will attempt to obtain this file using the location of the CSS file as the URL base. However, because the 'base' is the same for ALL resources loaded via the CDNJS view helper, the requests will fail.We need to come up with a method that allows a library to be referenced via the URL so that relative URLs will also work. This may mean that we can no longer use the encoded query string to load resources and may have to revert to the traditional path method. This could potentially be harmful as it could possibly allow anyone to load a resource through the site, allowing it to be cached and hence increasing traffic. We will need to have protections in place to prevent this. I'm thinking a start may be a local index of files that have been linked so that we know we are allowed to provide access to them.
created branch
92-updates-to-handle-linked-relative-resources-when-using-cdnjs-local-cache-option
mentioned in merge request !9
mentioned in commit
a6f6cf0846
closed via commit
5c7069a5aa