To get the same behavior that django provides with webapp2, you only need to add the following header to the response:
self.response.headers["X-Frame-Options"] = "SAMEORIGIN"
https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
Вопрос
I know there's WSGI middleware for django, but I can't find anything for webapp2. Would the django middleware work?
Решение
To get the same behavior that django provides with webapp2, you only need to add the following header to the response:
self.response.headers["X-Frame-Options"] = "SAMEORIGIN"
https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options