Run home assistant in an iframe (on a local KIOSK-RPi)

Like this question ( Run Home Assistant in an iframe), I’m intrested in running my Home Assistant in an <iframe />.

This is my situation:

  1. I access my Home Assistant locally by typing http://10.0.0.6:8123 in my browser. That works fine!

  2. Another project I’m working on, is to have Home Assistant in an <iframe /> on a KIOSK. This is what I want to achieve:

<DOCTYPE html>
<html>
	<head>
		<title>Example page</title>
	</head>
	<body>

		<iframe src="http://10.0.0.6:8123" title="Home Assistant"></iframe>
		<my-calendar> ... </my-calendar>
		<other-stuff> ... </other-stuff>
	</body>
</html>
Fig.1 - index.html

Goal:
I would like to be able to type http://10.0.0.50/index.html (10.0.0.50 is my webserver) in any browser on my network

Problem:
I can reach my page (http://10.0.0.50/index.html ) but Home Assistant does not show up:
Refused to display 'http://10.0.0.6:8123/' in a frame because it set 'X-Frame-Options' to 'sameorigin'. (browser log).

I understand that I probably (?) need to manipulate the http integration and maybe the setting use_x_frame_options someway?

This is what I have right now:

http:
  cors_allowed_origins:
    - http://10.0.0.9  
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24

What should I add/change/remove?

use_x_frame_options: false
1 Like