It seems I found the solution.

It works if instead of

<img src="
https://trial.resrc.it/s=w300m/https://mydomain/myapp/static/images/myimage.jpg";
/>

I use:

<img src="
//trial.resrc.it/s=w300m/https://mydomain/myapp/static/images/myimage.jpg
<https://trial.resrc.it/s=w300m/https://mydomain/myapp/static/images/myimage.jpg>"
/>




---------- Forwarded message ----------
From: al ex <a22...@gmail.com>
Date: Mon, Jan 12, 2015 at 5:11 AM
Subject: https and rescr.it responsive image
To: web2py@googlegroups.com


I am trying resrc.it (http://www.resrc.it/tutorials/preview) to manage
responsive images.
I use the scheme they suggest, on img tag:

<img src="
https://trial.resrc.it/s=w300m/https://mydomain/myapp/static/images/myimage.jpg";
/>

where s=w300m is a paramter/value to get the image resized.


This works fine when I am on

http://mydomain

but when I switch to https://mydomain

the above link gets changed to the following, I think from web2py (adds
mydomain after the first https).

https://mydomain/trial.resrc.it/s=w300m/https://mydomain/myapp/static/images/myimage.jpg


This throws a GET 400 Error.

The link

https://trial.resrc.it/s=w300m/https://mydomain/myapp/static/images/myimage.jpg


works, if I paste it on a browser.


I am using web2py:  2.9.11-stable+timestamp.2014.09.15.23.35.11 (Running on
nginx/1.7.0, Python 2.7.6)


I am not using routes.py.


Is there a way to force web2py not to prepend "https://mydomain"; to the
link when on https?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to