The video is hosted by YouTube (Google). When played, YouTube may set cookies.
The X-Frame-Options header is a security feature that can help protect web applications against clickjacking attacks.
Clickjacking is a type of attack in which an attacker tricks users into clicking a button or link on a web page that is hidden or disguised as a legitimate element. The attacker can use this technique to perform malicious actions, such as stealing sensitive information or installing malware on the user’s computer.
The X-Frame-Options header lets web developers control whether their pages can be displayed in an iframe on another site. By setting the header to “deny” or “sameorigin”, developers can prevent their pages from being shown in an iframe on another domain. This helps prevent clickjacking by making sure the user always interacts with the page directly, not through an iframe.
The header could also be set to “allow-from” to list specific domains allowed to display the page in an iframe, which can be useful for legitimate use cases such as embedding a video or other content from a trusted third-party site. (Modern browsers no longer support “allow-from”; use the Content-Security-Policy frame-ancestors directive instead.)
In general, the X-Frame-Options header should be implemented by every web application to help protect against clickjacking. By controlling whether their pages can be shown in iframes on other domains, developers make sure users always interact with their pages directly and reduce the risk of malicious activity.
Remediation:
Apache2- Add the following line to the Apache2 configuration file (e.g. /etc/apache2/apache2.conf, httpd.conf etc.):
Header always set X-Frame-Options "SAMEORIGIN" - Restart the web server
Nginx
- Add the following line to the configuration file:
add_header X-Frame-Options SAMEORIGIN always; - Restart the web server
IIS
- Add the following lines to "Web.config":
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
</customHeaders>
</httpProtocol> - Restart the web server
HAProxy
- Add one of the following lines to the configuration file:
rspadd X-Frame-Options:\ SAMEORIGIN
or, for newer versions:http-response set-header X-Frame-Options SAMEORIGIN - Restart the web server
Express
- Add the following lines to your application:
const helmet = require("helmet"); const app = express(); app.use(helmet.frameguard({ action: "SAMEORIGIN" })) - Restart the web server
