Merge branch 'MDL-64281-master' of git://github.com/jleyva/moodle
[moodle.git] / lib / weblib.php
index dac9deb..3199a1d 100644 (file)
@@ -2278,7 +2278,8 @@ function send_headers($contenttype, $cacheable = true) {
     }
     @header('Accept-Ranges: none');
 
-    if (empty($CFG->allowframembedding)) {
+    // The Moodle app must be allowed to embed content always.
+    if (empty($CFG->allowframembedding) && !core_useragent::is_moodle_app()) {
         @header('X-Frame-Options: sameorigin');
     }
 }