Hi OOD Community,
In case you are interested in using the excellent matlab-proxy package for your Matlab OOD app, I have a quick tip for you. I am not a web-developer, so please excuse my poor explanations below.
There has been a OOD portal configuration (ood_portal.yml
) variable called security_csp_frame_ancestors
since at least OOD version 1.8. As explained here, this Content-Security-Policy (CSP) directive specifies what sources can embed content via frames or iframes in a given page. Be default, the security_csp_frame_ancestors
variable is set to the hostname of the OOD host.
Well, it turns out that the matlab-proxy
embeds the Matlab interface within a frame. If you use any other domain other than the OOD host (for instance, an alias like login.cluster.school.edu
), the frame content is being delivered to another domain that is not permitted by the CSP rules, and the default behavior is for the browser to block the content entirely.
To fix this, you can set the value of security_csp_frame_ancestors
to include both the OOD server and your alternate domains like this:
security_csp_frame_ancestors: "https://ondemand.school.edu https://login.cluster.school.edu"
# or for multiple subdomains
security_csp_frame_ancestors: "https://ondemand.school.edu https://*.cluster.school.edu"
Generate the portal again, restart HTTPD and your Matlab app should work great.