Configuring CDN at Odoo

To configure a CDN in Odoo, log into your Odoo instance with the Administrator account and follow these steps:

  1. Activate the Developer mode, because the CDN configuration options are displayed only if you activated the Developer mode. Refer to the Activating the Odoo developer tools recipe from Chapter 1, Installing the Odoo Development Environment.
  2. Open the Configuration menu of the website app and search for the Content Delivery Networks (CDN) option:

  1. Set the following options in the website configuration and save the settings:
    • CDN Base URL: Set the URL provided by the CDN provider. In our example, we will use the zone URL we copied in step three the previous subsection.
    • CDN Filters: It is list of URL regex for website static resources. This rules used to identify the static resources which are going to served with CDN . Odoo will fill default values in this field, but if you are serving a static resource from any other URL, please add those URLs manually in a separate line.

To check whether the CDN integration is working well or not, follow this procedure:

  1. Log out from Odoo and open the website publicly,
  2. Open the browser developer tools and open the network tab.
  3. Reload the page and check the static resources URL in the networking log. Static resources should be loaded via CDN URLs exactly like in the following screenshot:

You might get Cross-Origin Resource errors, as shown in the following screenshot:

In order to fix these errors, you need to activate CORS from your CDN provider. In keyCDN, you will see the CORS option in advanced features, such as in the following screenshot:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset