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
Create ResourceResolver for changing URL domain [SPR-11869] #16488
in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Web applications sometimes don't use their main web domain to serve static web resources, and thus use a different domain. Here are some example use cases:
use of a cookie-less domain (such as http://static.example.org)
use of a CDN
This ResourceResolver (DomainResourceResolver, or CDNResourceResolver) should address that use case.
nowadays developers are often using "transparent" CDN services that also provide other features such as SSL support, analytics, etc. This often happens on the main domain of your application.
when using 3rd party CDNs, such as jsdelivr, Google, etc - those are usually explicitly set in your templates from the start or URLs are replaced thanks to build tools
our whole infrastructure for this rely on the path within the Handler mapping, which means we don't have access to the domain part of the URL when dealing with Resolvers and Transformers. This would require a good amount of rewrite/refactoring.
This decision is not definitive and we can reconsider this if we get enough votes/interesting use cases for this.
in: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Aug 18, 2014
Brian Clozel commented
See https://twitter.com/its_damo/status/499991519718158336 (in french)
spring-projects-issues commentedon Jan 27, 2015
Christopher Savory commented
I'm curious why this was labeled as 'Wont Fix'.
spring-projects-issues commentedon Jan 28, 2015
Brian Clozel commented
For several reasons:
This decision is not definitive and we can reconsider this if we get enough votes/interesting use cases for this.
spring-projects-issues commentedon Apr 2, 2017
smallufo commented
What if I just want resources to be served through CDN , not including spring's endpoints ?
for this SO : http://stackoverflow.com/q/43031682/298430
It is impossible (for spring-boot 1.4.5) , isn't it ?
spring-projects-issues commentedon Apr 3, 2017
Brian Clozel commented
smallufo It is not possible currently, for the reasons listed in my previous comment.