I work on one project and I realize that we don't use AntiForgeryToken. Of course there is a reason behind that. The reason is the our app can be in standalone mode (in this case everything is fine) and in integrated mode (in iframe). In integrated mode we have the following error:
Refused to display 'www.xxx.zzz' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Which is normal based on the following acticle:
https://blogs.msdn.microsoft.com/ieinternals/2010/03/30/combating-clickjacking-with-x-frame-options/
So here is what am i wondering:
If I use AntiForgeryToken in the app and I do this (in Application_Start()):
AntiForgeryConfig.SuppressXFrameOptionsHeader = true
which basically remove X-Frame-Options: SAMEORIGIN header and everyone can put my site as an iframe (actually they can do it right now) but we will keep AntiForgeryToken.
Are there any benefits if I do this or I have to live it as it is? In my point of view I have to do it but anyway just to ask for another opinion.
Cheers!