view.py与urls.py中的请求方法配置好了之后,在iframe调用,报如下错误:

Refused to display 'http://localhost:8000/welcome' in a frame because it set 'X-Frame-Options' to 'deny'.

解决办法:

在setting.py中加上:

X_FRAME_OPTIONS = 'ALLOWALL'

然后报错消失,iframe里的内容显示出来

相关文章:

  • 2021-08-02
  • 2021-05-26
  • 2021-08-17
  • 2021-10-30
  • 2021-12-22
  • 2021-06-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-22
  • 2022-03-02
  • 2021-11-24
  • 2022-12-23
  • 2021-05-25
  • 2021-05-30
相关资源
相似解决方案