If you wish to embed your contact form, or any page created by portal framework, in the third party website, such as Wix, WordPress, etc, you would probably encountered an security permission error, due to CORS (Cross Origin Resource Sharing).
By default, nginx (proxy server) will blocked any attempt to access the Odoo page from the third party website.
Some people suggest to enable cors='*' in your controller. Actually, you dont really need to do it.
In the /etc/nginx/site-enabled/website.name, add the following.
server{
.......
add_header Access-Control-Allow-Origin "wix.com";
}
you can add multiple add_header to allow for different website. I don't recommend you to use * to allow all, due to the security risk.
You can go to https://www.iframe-generator.com/ to enter the URL (eg, https://xxxxx.example.com) of your Odoo page to generate the IFrame code, which can be copy and paste to the third party website.
Example of the embedding Odoo page in the Wix.
Komentar