Long polling

Long polling is used to support the instant messaging app, and when using multiprocessing workers, it is handled on a separate port, which is 8072 by default.

For our reverse proxy, this means that the long polling requests should be passed to this port. To support this, we need to add a new upstream to our Nginx configuration, as shown in the following code:

upstream backend-odoo-im { server 127.0.0.1:8072; } 

Next, we should add another location to the server handling the HTTPS requests, as follows:

location /longpolling { proxy_pass http://backend-odoo-im;} 

With these settings, Nginx should pass these requests to the proper Odoo server port.

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.