[ic] Force external image links to inherit page security

Paul Jordan paul at gishnetwork.com
Wed Dec 5 22:34:46 UTC 2012


> Leave the protocol out completely.
> 
>   <img src="//foo.bar.jpg" />
> 
> I haven't tried this for images but it works fine for hrefs so img tags
should be
> good too.
> 
> Dan


Dude... awesome. This will be perfect!

I guess the browser understands that if it is inside an "<img..." to use
http(s) as opposed to 'ftp:' or whatever?

Thank you

Paul






>  Dan Busarow
>  dan at buildingonline.com
>  949 496 6648 x218
>  Follow BuildingOnline on:
>   http://Twitter.com/BuildingOnline
>   http://Facebook.com/BuildingOnline
>   http://Linkedin.com/groupRegistration?gid=1925831
> 
> 
> On Dec 5, 2012, at 12:03 PM, Paul Jordan <paul at gishnetwork.com> wrote:
> 
> >
> > I am working on a system where I need to host images - mostly product
> images, in the cloud.
> >
> > Is there a (built in) mechanism to write plain ole http:// src's to the
page,
> but have the page sense if it is being requested via https, and exchange
any
> 'http' with 'https'?  Or, is there perhaps a method to declare a variable
twice,
> once for http requests and once for https requests? If so, then I could
do:
> >
> > S3_IMAGES    http://.....    https://.....    Cloud product images
> >
> > I realize I can use ImageDir and ImageDirSecure, but these are only
singular
> solutions. I need to leverage a couple of these (as if I we're using
multiple
> clouds). Obviously I can do a bunch of If-Secure-Else in all my pages, but
I was
> hoping for something more elegant.
> >
> > Or if nothing else, has anyone needed to use multiple external asset
hosts
> and deliver the same page(s) via http and https?  What did you come up
> with?
> >
> > Worst case scenario, I can poor man it:
> >
> >   [if type="explicit" compare="[is-secure]"]
> >       [tmpn ssl]s[tmpn]
> >   [else]
> >       [tmpn ssl][tmpn]
> >   [/else]
> >   [/if]
> >
> > <img src="http[scratch ssl]://foo.bar.jpg" />
> >
> > But... that seems like the old me :-)
> >
> >
> > Paul
> >
> > _______________________________________________
> > interchange-users mailing list
> > interchange-users at icdevgroup.org
> > http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users



More information about the interchange-users mailing list