Skip to content

Create ResourceResolver for changing URL domain [SPR-11869] #16488

Closed

Description

@spring-projects-issues

Brian Clozel opened SPR-11869 and commented

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.


Issue Links:

0 votes, 5 watchers

Activity

  1. spring-projects-issues commented on Jan 27, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Christopher Savory commented

    I'm curious why this was labeled as 'Wont Fix'.

  2. spring-projects-issues commented on Jan 28, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Brian Clozel commented

    For several reasons:

    • 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.

  3. spring-projects-issues commented on Apr 2, 2017

    @spring-projects-issues
    CollaboratorAuthor

    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 ?

  4. spring-projects-issues commented on Apr 3, 2017

    @spring-projects-issues
    CollaboratorAuthor

    Brian Clozel commented

    smallufo It is not possible currently, for the reasons listed in my previous comment.

  5. added
    status: declined
    type: enhancement
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webstatus: declinedtype: enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions