Skip to Content
Menu
This question has been flagged
1 Reply
1489 Views

I am using mail marketing.

The system generates mails, and the images are served through URLs to the server.

The URLs are of the form:

https://<external proxy>/web/image/447/<filename.jpg>?access_token=<uuid>

This URL does not work, but if I use the URL

http://localhost:8069/web/image/447/<filename.jpg>?access_token=<uuid>

it works.

The only difference I see in the logs is that the *good* URL generates a

<date time> 1 INFO Odoo1 werkzeug: 172.18.0.1 - - [<datetime>] "GET /web/image/447/<filename.jpg>?access_token=<uuid> HTTP/1.1" 304 - 6 0.003 0.008

whereas the *bad* proxied URL generates a

<date time> 1 INFO ? werkzeug: 172.18.0.1 - - [<datetime>] "GET /web/image/447/<filename.jpg>?access_token=<uuid> HTTP/1.1" 404 - 1 0.002 0.019
So there is a ? question mark instead of Odoo1 which is the name of my Odoo database.

Thank you for any pointer to some reading about this. I did not touch any particular setting in the email marketing, except setting the base.url in Odoo settings to the proxied server.

Have a great day, Hubert



Avatar
Discard
Author Best Answer

I understood the problem. Actually the difference was not between proxied and not proxied, but between authenticated and not authenticated.

The non authenticated user has no default database, the authenticated one has a current database (Hence the difference with the ? in the log).

To resolve the problem, it is sufficient to present Odoo with only one database, and the file will load automatically.

See https://www.odoo.com/forum/help-1/question/how-to-select-one-database-by-default-9741 for how to do this technically (dbfilter in odoo.conf).

Hope this can be useful to someone.
Avatar
Discard