How to set X-Frame Options to ALLOW-FROM https://example.com and SAMEORIGIN on server

前端 未结 2 1700
孤街浪徒
孤街浪徒 2021-02-13 05:15

I have a requirement to set the X-Frame options on the server level to either:

  • X-Frame-Options: SAMEORIGIN
  • X-Frame-Options: A
2条回答
  •  醉酒成梦
    2021-02-13 06:06

    I had a similar requirement and i handled in global.asax. i checked from where the request is coming and based on that i changed the header value to either sameorigin or allow-from. hope that helps.

提交回复
热议问题