Problem with URLModifier and CSS images

135 views
Skip to first unread message

Robin M

unread,
May 1, 2013, 10:32:23 AM5/1/13
to cass...@googlegroups.com
Hi Andrew,

We're having an issue with URLModifier in our app with Cassette 2.0.0.

We've only just moved to v2 and we're trying to deal with the fact that the Cassette paths have changed. In v1, we used the first part of the path to direct to the correct app on the reverse proxy that sits in front of the webservers. In v2, URLModifier seemed to be the way to go.

We've created a URLModifier which prepends the application name and it works for CSS e.g.
/AppName-cassette.axd/stylesheet/oItKqvmnTHqsg6uNMNCi0CpuC30=/MyBundle
but not for images e.g.
/AppName-cassette.axd/file/Images/MyImage-8cee044cff92fad4bcf7d0631fa5cb9da6e58a86.png

We thought we had a workaround in using EmbedImages for the stylesheet bundles but that doesn't seem to include our background image.

We'll have a look round the code but I wanted to raise this in case there was a quick solution.

Cheers,

Robin

Andrew Davey

unread,
May 2, 2013, 4:04:55 AM5/2/13
to Cassette
What are the image URLs looking like in the outputted CSS?


--
You received this message because you are subscribed to the Google Groups "Cassette" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cassette+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Robin M

unread,
May 2, 2013, 4:09:59 AM5/2/13
to cass...@googlegroups.com
Like this:

/AppName-cassette.axd/file/Images/MyImage-8cee044cff92fad4bcf7d0631fa5cb9da6e58a86.png

I forgot to mention that it works if you remove the prefix and try it in a browser i.e.

/cassette.axd/file/Images/MyImage-8cee044cff92fad4bcf7d0631fa5cb9da6e58a86.png

Cheers,

Robin

Andrew Davey

unread,
May 2, 2013, 4:42:25 AM5/2/13
to Cassette
How is your load balancer transforming the incoming URLs in order to get from the origin web server? If it's working for the bundle URLs, but not the image URLs, then maybe something is off with the transformation?

Robin M

unread,
May 2, 2013, 5:53:34 AM5/2/13
to cass...@googlegroups.com
The URLs aren't modified by the load balancer rather we modify them in Cassette so that the load balancer can route them properly. It happens when the load balancer isn't used too.

I've created a little repro project that illustrates the issue (attached).

Cheers,

Robin
CassetteRepro.zip

Robin M

unread,
May 7, 2013, 7:25:59 PM5/7/13
to cass...@googlegroups.com
Would it be helpful if I opened a Github issue for this?

Cheers,

Robin

Andrew Davey

unread,
May 8, 2013, 6:55:14 AM5/8/13
to Cassette
I didn't seem to get your previous email with the attachment. Perhaps Google Groups ate it?

A GitHub issue sounds like a good idea. Please do create one.

Robin M

unread,
May 10, 2013, 5:03:06 PM5/10/13
to cass...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages