You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider enhancing ResourceUrlProvider to be able to change the domain, port, or scheme [SPR-12130] #16746
We considered allowing ResourceResolvers to return complete URLs (and not only the resource path), but the current design for the Resource (Resolver/Transformer) chain is simple and cohesive -- focused mainly on the resource path. The ability to modify the domain, port, and scheme is a separate concern.
This issue is to explore the following solution:
configuring globally an HTTP domain for all resolved resources though ResourceUrlProvider, making it a cross-cutting concern for ResourceResolvers
this configuration could be done at the java config level with WebMvcConfigurerAdapter or WebMvcConfigurationSupport
Hi Guillaume DROUET, I think this issue might interest you as well.
Does your project need to change URL domains as part of the resolvers/transformer? Or a separate setting, as suggested here is acceptable?
Of course! As mentionned in your twitter conversation, serving statics from a cookie less domain is important and in my project I take care of it by allowing to set several locations to use when writing URLs. So if spring allows to do it, the users may have the choice to choose between spring and third party framework as it can be done with PathResourceResolver and VersionStrategy. Sounds good to me if we can configure everything from WebMvcConfigurerAdapter...
Hi , I recently have the same question , and find this issue.
I noticed it is marked resolved . but I cannot find any document mentioning how to change the host of a static resource ?
Activity
spring-projects-issues commentedon Aug 28, 2014
Brian Clozel commented
Hi Guillaume DROUET, I think this issue might interest you as well.
Does your project need to change URL domains as part of the resolvers/transformer? Or a separate setting, as suggested here is acceptable?
Thanks,
spring-projects-issues commentedon Aug 28, 2014
Guillaume DROUET commented
Hi!
Of course! As mentionned in your twitter conversation, serving statics from a cookie less domain is important and in my project I take care of it by allowing to set several locations to use when writing URLs. So if spring allows to do it, the users may have the choice to choose between spring and third party framework as it can be done with PathResourceResolver and VersionStrategy. Sounds good to me if we can configure everything from WebMvcConfigurerAdapter...
spring-projects-issues commentedon Apr 2, 2017
smallufo commented
Hi , I recently have the same question , and find this issue.
I noticed it is marked
resolved. but I cannot find any document mentioning how to change the host of a static resource ?related stackoverflow : http://stackoverflow.com/q/43031682/298430
spring-projects-issues commentedon Apr 3, 2017
Brian Clozel commented
It's resolved as duplicate of #16488 - and you've commented there as well.