@misilot, thanks for the plugin.
I had to add
proxy_hide_header to the plugin to clear the
Invalid 'X-Frame-Option' message (but I’m not sure if that HTTP error actually caused any problems because the PDF document still displays). Even so, there must be some correlation because the
fetch command in a
Raw HTML block tended to only fail on pages with an embedded PDF document with the
Invalid 'X-Frame-Option' header. It didn’t fail every time, which makes it hard to pinpoint the root cause.
Here is the original error using the pdfXBlock:
Here is the modified plugin if others need to embed Open edX as an iframe or clear headers:
add_header Access-Control-Allow-Origin *;
Nginx has three ways to remove HTTP response headers.
proxy_set_header had no impact
proxy_set_header X-Frame-Options "";
more_clear_headers fails because Nginx plugin ngx_headers_more is not installed
nginx: [emerg] unknown directive "more_clear_headers" in /etc/nginx/conf.d/lms.conf:46
proxy_hide_header successfully removed the HTTP header so that the client does not see it.