我试图显示this page在自定义 Facebook 选项卡中。
它给了我以下错误:
Refused to display 'https://welcome-dev.herokuapp.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'.
This thread建议我从 MIDDLEWARE_CLASSES 中删除“XFrameOptionsMiddleware”。
当我删除它时,出现以下错误:
CSRF verification failed. Request aborted.
原因:
Reason given for failure:
Referer checking failed - https://s-static.ak.facebook.com/platform/page_proxy/hv09mZVdEP8.js does not match https://welcome-dev.herokuapp.com/
不知道该怎么办。
如何解决这个问题?
最佳答案
@csrf_exempt解决了问题
关于python - 添加自定义 Facebook 选项卡应用程序时,“X-Frame-Options”设置为 'SAMEORIGIN',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29276331/