Welcome! Log In Create A New Profile

Advanced

proxy_pass value used as stripe webhook in odoo container

Posted by liu007 
proxy_pass value used as stripe webhook in odoo container
September 05, 2023 04:15PM
Hi all

I'm trying to configure stripe to work with a containerized odoo instance with a containerized nginx instance and hitting an issue where the exact value being used for proxy_pass is being used in stripe's web hook. For example, if I put "proxy_pass http://the.upstream" it will try to use this instead of the hostname of the site (i.e., example.com). The stripe web hook is created in the odoo software when configuring payments and it is pulling the proxy_pass value.

To get around this, I'm using the site url in the proxy pass. This doesn't seem to be the best way to handle this. Do you have any ideas on a better solution I could try?

A trimmed down conf.d/odoo.conf file is below. Thanks in advance for taking a look and any feedback you have.


upstream example.com {
server odoo:8069; # traffic is sent to the odoo container on the container port 8069
}

server {
listen 80;
listen [::]:80;
server_name example.com;

location / {
rewrite ^ https://$host$request_uri? permanent;
}
}

server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com;

# ssl cert info was removed for brevity. this is working fine

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://example.com; # this is the working solution, but not ideal

}

}



Edited 1 time(s). Last edit at 09/05/2023 04:18PM by liu007.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 170
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready