浏览器IFrame出Refused to display URL in a frame because it set X-Frame-Options to SAMEORIGIN 的错

1.问题:谷歌浏览器报错信息:

Refused to display 'ip address' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.

2. 解决方法:

在’settings.py’文件中,代码最后添加这两行.就完美的解决了

X_FRAME_OPTIONS = 'ALLOWALL'

XS_SHARING_ALLOWED_METHODS = ['POST','GET','OPTIONS', 'PUT', 'DELETE']

3. 其他问题:

浏览器IFrame出Refused to display ‘URL’ in a frame because it set ‘X-Frame-Options’ to ‘DENY’ 的错

请参考:https://blog.csdn.net/fl_zxf/article/details/51100599

你可能感兴趣的:(Django)