Antonio David Gutiérrez
unread,May 16, 2023, 3:06:48 AM5/16/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Wazuh mailing list
Hi Martin,
The recent Wazuh plugin sets the x-frame-options header to sameorigin in the response of the Wazuh dashboard or Kibana and this could be affecting all the responses of the server. Maybe this is the cause why you can not share the dashboard on another website. You could give it a try to change the value defined by the Wazuh plugin and see if this works.
The file that contains the definition of the x-frame-options response header is:
- Wazuh dashboard: /usr/share/wazuh-dashboard/plugins/wazuh/server/plugin.ts
- Kibana: /usr/share/kibana/plugins/wazuh/server/plugin.ts
You have to search in this file for the response header definition that should look like this:
core.http.registerOnPreResponse((request, response, toolkit) => {
const additionalHeaders = {
'x-frame-options': 'sameorigin'
};
return toolkit.next({
headers: additionalHeaders
});
});
Follow the steps:
1. Stop the Wazuh dashboard or Kibana server
2. Take a backup of the specified file to edit
3. Edit the value of the x-frame-options header definition in the specified file to the desired value
4. Restart the Wazuh dashboard or Kibana server
Note if you replace the Wazuh plugin or upgrade, this change will be lost, so you could have to apply it to the new plugin again.