I have a multimedia site contains thousands of videos. I had to prevent "clickjacking" due to some problems I occured.
The thing is when I include the following header to my httpd.config file, users cannot share my videos through social networks or applications.
Header always append X-Frame-Options SAMEORIGIN
I host the embed videos through https://example.org/embed/VIDEO-ID
Is it possible to disable X-Frame-Options SAMEORIGIN
just for embed videos? If so, could you please explain it to me?
What I have tried so far;
- I tried to remove header in /embed/ with PHP
- I tried to unset the header in /embed/
On httpd I've done the following;
header always append X-Frame-Options SAMEORIGIN
On /embed/ page I am doing the following;
header_remove("X-Frame-Options");
header('X-Frame-Options: GOFORIT');