Forum Discussion
Clickjacking protection using X-FRAME-OPTIONS: ALLOW-FROM URI
Hello Folks,
Can anyone help by sharing a snippet of iRule by inserting XFRAME-OPTIONS:ALLOW-FROM (single / multiple URI)?
The requirement is to allow certain Frames from different applications hosted within the same environment. Since X-FRAME-OPIONS:Allow-from supports only 1 URI, can we create any iRule to embed multiple URI for "Allow-from" header?
Perhaps using String based Data group, and call that Data group within an iRule, and verify if the URI is part of the Data group?
Thank you mates! Cheers!
1 Reply
- Zeeshan_Ahmad_1
Nimbostratus
Hi Darshan,
Note that in X-Frame-Options header Allow-From token does not support wildcards or listing of multiple origins and it is not supported by couple of browsers as well, you can use the below irule where you can mention the URL from where you want to make it accessible
when HTTP_RESPONSE { HTTP::header replace X-Frame-Options "ALLOW-FROM http://www.mysite.com" }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com