Quantcast

Grails Resources Prefix + Grails CDN resources not working together

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Grails Resources Prefix + Grails CDN resources not working together

dsantamaria
Hi,
I just trying to use the Prefix thing in the resources plugin:
grails.resources.uri.prefix="myFolder"

And so far it is working, I hit in the page and see that is looking for this resource :


but when I try to put it together with the cdn-resources plugin with this:

grails.resources.cdn.enabled = true
grails.resources.cdn.url = "http://YYYYYYYYYYY.cloudfront.net"

and hit the web It is looking for this:


Instead of this one:


That is the actual file.
Seems like a Bug in the CDN resources plugin, any ideas?
Thanks.

--
David.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails Resources Prefix + Grails CDN resources not working together

tomas lin
yup,

it's a bug in the resource plugin.

But you can add the prefix in your cdn.url so that it is
"http://YYYYYYYYYYY.cloudfront.net/myFolder/"

the reason for this is that the plugin author did not know at all
about this whole fancy schmancy prefix stuff.



On Tue, Nov 8, 2011 at 12:07 PM, David Santamaria
<[hidden email]> wrote:

> Hi,
> I just trying to use the Prefix thing in the resources plugin:
> grails.resources.uri.prefix="myFolder"
> And so far it is working, I hit in the page and see that is looking for this
> resource :
> http://localhost:8080/testresources/myFolder/file.js
> but when I try to put it together with the cdn-resources plugin with this:
> grails.resources.cdn.enabled = true
> grails.resources.cdn.url = "http://YYYYYYYYYYY.cloudfront.net"
> and hit the web It is looking for this:
> http://YYYYYYYYYYY.cloudfront.net/file.js
> Instead of this one:
> http://YYYYYYYYYYY.cloudfront.net/myFolder/file.js
> That is the actual file.
> Seems like a Bug in the CDN resources plugin, any ideas?
> Thanks.
> --
> David.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails Resources Prefix + Grails CDN resources not working together

tomas lin
correction: bug in cdn-resources plugin

On Tue, Nov 8, 2011 at 12:47 PM, Tomas Lin <[hidden email]> wrote:

> yup,
>
> it's a bug in the resource plugin.
>
> But you can add the prefix in your cdn.url so that it is
> "http://YYYYYYYYYYY.cloudfront.net/myFolder/"
>
> the reason for this is that the plugin author did not know at all
> about this whole fancy schmancy prefix stuff.
>
>
>
> On Tue, Nov 8, 2011 at 12:07 PM, David Santamaria
> <[hidden email]> wrote:
>> Hi,
>> I just trying to use the Prefix thing in the resources plugin:
>> grails.resources.uri.prefix="myFolder"
>> And so far it is working, I hit in the page and see that is looking for this
>> resource :
>> http://localhost:8080/testresources/myFolder/file.js
>> but when I try to put it together with the cdn-resources plugin with this:
>> grails.resources.cdn.enabled = true
>> grails.resources.cdn.url = "http://YYYYYYYYYYY.cloudfront.net"
>> and hit the web It is looking for this:
>> http://YYYYYYYYYYY.cloudfront.net/file.js
>> Instead of this one:
>> http://YYYYYYYYYYY.cloudfront.net/myFolder/file.js
>> That is the actual file.
>> Seems like a Bug in the CDN resources plugin, any ideas?
>> Thanks.
>> --
>> David.
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails Resources Prefix + Grails CDN resources not working together

dsantamaria
Yep, I did exactly that, and works, but still a workaround for a bug ;).
Many thanks for the response, do you need a JIRA or GitHub ticket?

2011/11/8 Tomas Lin <[hidden email]>
correction: bug in cdn-resources plugin

On Tue, Nov 8, 2011 at 12:47 PM, Tomas Lin <[hidden email]> wrote:
> yup,
>
> it's a bug in the resource plugin.
>
> But you can add the prefix in your cdn.url so that it is
> "http://YYYYYYYYYYY.cloudfront.net/myFolder/"
>
> the reason for this is that the plugin author did not know at all
> about this whole fancy schmancy prefix stuff.
>
>
>
> On Tue, Nov 8, 2011 at 12:07 PM, David Santamaria
> <[hidden email]> wrote:
>> Hi,
>> I just trying to use the Prefix thing in the resources plugin:
>> grails.resources.uri.prefix="myFolder"
>> And so far it is working, I hit in the page and see that is looking for this
>> resource :
>> http://localhost:8080/testresources/myFolder/file.js
>> but when I try to put it together with the cdn-resources plugin with this:
>> grails.resources.cdn.enabled = true
>> grails.resources.cdn.url = "http://YYYYYYYYYYY.cloudfront.net"
>> and hit the web It is looking for this:
>> http://YYYYYYYYYYY.cloudfront.net/file.js
>> Instead of this one:
>> http://YYYYYYYYYYY.cloudfront.net/myFolder/file.js
>> That is the actual file.
>> Seems like a Bug in the CDN resources plugin, any ideas?
>> Thanks.
>> --
>> David.
>>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
David.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails Resources Prefix + Grails CDN resources not working together

tomas lin
github ticket would work.

patch would be better...

On Tue, Nov 8, 2011 at 12:56 PM, David Santamaria
<[hidden email]> wrote:

> Yep, I did exactly that, and works, but still a workaround for a bug ;).
> Many thanks for the response, do you need a JIRA or GitHub ticket?
>
> 2011/11/8 Tomas Lin <[hidden email]>
>>
>> correction: bug in cdn-resources plugin
>>
>> On Tue, Nov 8, 2011 at 12:47 PM, Tomas Lin <[hidden email]> wrote:
>> > yup,
>> >
>> > it's a bug in the resource plugin.
>> >
>> > But you can add the prefix in your cdn.url so that it is
>> > "http://YYYYYYYYYYY.cloudfront.net/myFolder/"
>> >
>> > the reason for this is that the plugin author did not know at all
>> > about this whole fancy schmancy prefix stuff.
>> >
>> >
>> >
>> > On Tue, Nov 8, 2011 at 12:07 PM, David Santamaria
>> > <[hidden email]> wrote:
>> >> Hi,
>> >> I just trying to use the Prefix thing in the resources plugin:
>> >> grails.resources.uri.prefix="myFolder"
>> >> And so far it is working, I hit in the page and see that is looking for
>> >> this
>> >> resource :
>> >> http://localhost:8080/testresources/myFolder/file.js
>> >> but when I try to put it together with the cdn-resources plugin with
>> >> this:
>> >> grails.resources.cdn.enabled = true
>> >> grails.resources.cdn.url = "http://YYYYYYYYYYY.cloudfront.net"
>> >> and hit the web It is looking for this:
>> >> http://YYYYYYYYYYY.cloudfront.net/file.js
>> >> Instead of this one:
>> >> http://YYYYYYYYYYY.cloudfront.net/myFolder/file.js
>> >> That is the actual file.
>> >> Seems like a Bug in the CDN resources plugin, any ideas?
>> >> Thanks.
>> >> --
>> >> David.
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> David.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails Resources Prefix + Grails CDN resources not working together

Marc Palmer Local
In reply to this post by tomas lin

On 8 Nov 2011, at 12:47, Tomas Lin wrote:

> yup,
>
> it's a bug in the resource plugin.
>
> But you can add the prefix in your cdn.url so that it is
> "http://YYYYYYYYYYY.cloudfront.net/myFolder/"
>
> the reason for this is that the plugin author did not know at all
> about this whole fancy schmancy prefix stuff.
>


The resource prefix is only for local URLs. I don't think this is a bug. When you provide absolute link overrides, the resource prefix should not apply - it is only used to namespace URLs in your local app.

Or am I misunderstanding the problem?


Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java)

Founder @ http://noticelocal.com | Developer @ http://weceem.org
Member @ http://spottymushroom.com | Contributor @ http://grails.org
Twitter: http://twitter.com/wangjammer5 | Resumé: http://www.anyware.co.uk/marc/
Blog: http://www.anyware.co.uk | Grails Rocks: http://www.grailsrocks.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails Resources Prefix + Grails CDN resources not working together

dsantamaria
Hi,
I believe that the problem is that the first load, the resources that are not in the Cloudfront (I am using the cloudfront approach explained in the docs of the CDN resources), are loaded from your local app (as with CDN disabled) and (i guess) that are loaded into the cloudfront network with the same path that they have locally,  that is the moment what makes it fail.
It is my guess, maybe who is missing something it is me.
Regards,
David.

2011/11/8 Marc Palmer <[hidden email]>

On 8 Nov 2011, at 12:47, Tomas Lin wrote:

> yup,
>
> it's a bug in the resource plugin.
>
> But you can add the prefix in your cdn.url so that it is
> "http://YYYYYYYYYYY.cloudfront.net/myFolder/"
>
> the reason for this is that the plugin author did not know at all
> about this whole fancy schmancy prefix stuff.
>


The resource prefix is only for local URLs. I don't think this is a bug. When you provide absolute link overrides, the resource prefix should not apply - it is only used to namespace URLs in your local app.

Or am I misunderstanding the problem?


Marc

~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java)

Founder @ http://noticelocal.com | Developer @ http://weceem.org
Member @ http://spottymushroom.com | Contributor @ http://grails.org
Twitter: http://twitter.com/wangjammer5 | Resumé: http://www.anyware.co.uk/marc/
Blog: http://www.anyware.co.uk | Grails Rocks: http://www.grailsrocks.com


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
David.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails Resources Prefix + Grails CDN resources not working together

tomas lin
It feels like if you are adding a prefix to resource bundles, these
should be reflected in the pull-down CDN.

This is a bug in the CDN resources plugin.

On Tue, Nov 8, 2011 at 2:28 PM, David Santamaria <[hidden email]> wrote:

> Hi,
> I believe that the problem is that the first load, the resources that are
> not in the Cloudfront (I am using the cloudfront approach explained in the
> docs of the CDN resources), are loaded from your local app (as with CDN
> disabled) and (i guess) that are loaded into the cloudfront network with the
> same path that they have locally,  that is the moment what makes it fail.
> It is my guess, maybe who is missing something it is me.
> Regards,
> David.
> 2011/11/8 Marc Palmer <[hidden email]>
>>
>> On 8 Nov 2011, at 12:47, Tomas Lin wrote:
>>
>> > yup,
>> >
>> > it's a bug in the resource plugin.
>> >
>> > But you can add the prefix in your cdn.url so that it is
>> > "http://YYYYYYYYYYY.cloudfront.net/myFolder/"
>> >
>> > the reason for this is that the plugin author did not know at all
>> > about this whole fancy schmancy prefix stuff.
>> >
>>
>>
>> The resource prefix is only for local URLs. I don't think this is a bug.
>> When you provide absolute link overrides, the resource prefix should not
>> apply - it is only used to namespace URLs in your local app.
>>
>> Or am I misunderstanding the problem?
>>
>>
>> Marc
>>
>> ~ ~ ~
>> Marc Palmer
>> Freelancer (Grails/Groovy/Java)
>>
>> Founder @ http://noticelocal.com | Developer @ http://weceem.org
>> Member @ http://spottymushroom.com | Contributor @ http://grails.org
>> Twitter: http://twitter.com/wangjammer5 | Resumé:
>> http://www.anyware.co.uk/marc/
>> Blog: http://www.anyware.co.uk | Grails Rocks: http://www.grailsrocks.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> David.
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...