Merge lp://staging/~mikel-martin/openerp-web/fix-mobile-https-redirecttion-loop into lp://staging/openerp-web

Proposed by mikel
Status: Merged
Merged at revision: 2213
Proposed branch: lp://staging/~mikel-martin/openerp-web/fix-mobile-https-redirecttion-loop
Merge into: lp://staging/openerp-web
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web_mobile/static/src/web_mobile.html (+1/-1)
To merge this branch: bzr merge lp://staging/~mikel-martin/openerp-web/fix-mobile-https-redirecttion-loop
Reviewer Review Type Date Requested Status
Xavier (Open ERP) Pending
Review via email: mp+93165@code.staging.launchpad.net

This proposal supersedes a proposal from 2012-02-14.

Description of the change

When using apache or smilar to proxy the web interface and secure the conection with https, the /mobile url enters an infinite redirection loop due to the javascript in addons/web_mobile/static/src/web_mobile.html

Just one line to FIX the problem.

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote : Posted in a previous version of this proposal

I think a better and sturdier fix would be to check not `document.URL` (which requires matching the scheme and domain) but `window.location.pathname`. This would allow us to check directly against `"/web_mobile/static/src/web_mobile.html"`, avoiding the issue altogether (and working for `file:` access as well if needs be).

review: Needs Fixing
Revision history for this message
mikel (mikel-martin) wrote : Posted in a previous version of this proposal

You're rigth Xavier

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.