Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Redirect behind https proxy not working

By
Matt Pruett
on 7/1/15, 12:28 PM 1,412 views

     This works on http but not https

    @http.route('/client_crm/access/', auth='user') 
    def index(self, **kw): cr, uid, context, registry = request.cr, request.uid, request.context, request.registry mdl_wac = registry.get('wrapper_allclients.wrapper_allclients'); url = mdl_wac.allclients_user_url(cr, uid) return werkzeug.utils.redirect(url)


So this controller does a redirect to an external url.  I have an apache proxy setup for both 80 and 443.  Everything else Odoo works on both ports but this.  The behavior is this:

On http:
redirects to https://external.url.com/path?querystring


On https:

redirects to https://odoo.url.com/path?querystring


So the path and query string are correct but for some reason when on https it removes the domain and replaces with odoo domain.

0
Matt Pruett
On 7/2/15, 12:11 AM

If anyone else is struggling with this for a payment gateway or SSO solution I was able to put in a quick fix using apache.

 <If "%{SERVER_PROTOCOL} != 'HTTP'">
        Redirect "/client_crm/access/" http://odoo.url.com:8069/client_crm/access/
</If>


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 7/1/15, 12:28 PM
Seen: 1412 times
Last updated: 7/2/15, 12:11 AM