Skip to content

Improve CssLinkResourceTransformer to only update links to relative resources [SPR-11860] #16479

@spring-projects-issues

Description

@spring-projects-issues

Rossen Stoyanchev opened SPR-11860 and commented

We should only update links that point to resources we serve. The CssLinkResourceTransformer should have a check that excludes links that are not relative -- i.e. either links that don't start with "/" or links that start with a scheme. The scheme could be as simple as looking for the first ":" and then ensuring the resulting substring does not contain any "/". This is very similar to a check added recently to StringUtils.cleanPath.


Affects: 4.1 RC1

This issue is a sub-task of #16420

Issue Links:

Referenced from: commits 72baa9b

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions