ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
# iframe_embed_settings 标签   这个标签在文件:horizon\openstack_dashboard\templatetags\context_selection.py中被 定义。其代码 如下: ~~~ @register.inclusion_tag('context_selection/_anti_clickjack.html', takes_context=True) def iframe_embed_settings(context): disallow_iframe_embed = getattr(settings, 'DISALLOW_IFRAME_EMBED',True) context = {'disallow_iframe_embed': disallow_iframe_embed} return context ~~~ 'context_selection/_anti_clickjack.html' 这个文件对就路径为: horizon\openstack_dashboard\templates\context_selection\_anti_clickjack.html 。其里面的内容为: ~~~ {% if disallow_iframe_embed %} <style id="anti-clickjack">body{display:none !important;}</style> <script type='text/javascript' charset="utf-8"> if (self === top) { var antiClickjack = document.getElementById("anti-clickjack"); antiClickjack.parentNode.removeChild(antiClickjack); } else { top.location = self.location; } </script> {% endif %} ~~~ 这段JS代码就被引入了。