Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
430 Представления

I am trying to setup OIDC authentication in Odoo 17 Community.  The system parameter web.base.url​ and web.base.url.freeze​are already set to https://foo.bar.baz​ and TRUE​ respectively.


However, from the IDP side, the referrer URI / redirect URI still shows as insecure HTTP (http://foo.bar.baz​) thereby causing the IDP to reject the authentication request.


HTTPS capability is provided via Nginx, and proxy_mode=True​ is already set in /etc/odoo.conf​.

In my Nginx configuration, I also have:

server {
    if ($host = foo.bar.baz) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
    listen 80;
    server_name foo.bar.baz;
    return 404; # managed by Certbot
}


Is there anything else I might be missing that causes the referrer URI / redirect URI to remain the insecure HTTP instead of HTTPS?  I do not have an option in the IDP to allow insecure referrer URI, and I think it is also not a very good idea.


Аватар
Отменить
Автор Лучший ответ

The problem was solved following the instructions from:

Google OAuth 2 + SSL - Error: redirect_uri_mismatch · Issue #9057 · odoo/odoo · GitHub 

Simply put, X-Forwarded-Host needs to be added in the Nginx's server block.

proxy_set_header X-Forwarded-Host $host;

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
янв. 22
2660
1
февр. 23
2195
0
янв. 21
4627
2
дек. 24
5611