Problem with Octoprint inside iFrame

What is the problem?

When I try to load Octoprint UI inside an iFrame I get the error:

Loading failed:

Initial settings fetch failed. Please check your [browser's error console](https://faq.octoprint.org/browser-console) and `octoprint.log` for possible reasons.Also make sure that the server is actually running by reloading this page.

My error console shows ther error:
packed_libs.js?86afb3b9:13 GET http://10.0.0.214/api/settings 403 (FORBIDDEN)

What did you already try to solve it?

I checked the logs but could not see any errors. I have searched for the settings for the API but could not find anything interesting.

Have you tried running in safe mode?

Yes. But the error still occured.

Did running in safe mode solve the problem?

No. The error still occured.

Systeminfo Bundle

browser.user_agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36
connectivity.connection_check : 1.1.1.1:53
connectivity.connection_ok : true
connectivity.enabled : true
connectivity.online : true
connectivity.resolution_check : octoprint.org
connectivity.resolution_ok : true
env.hardware.cores : 4
env.hardware.freq : 1200
env.hardware.ram : 915722240
env.os.bits : 32
env.os.id : linux
env.os.platform : linux
env.plugins.pi_support.model : Raspberry Pi 3 Model B Rev 1.2
env.plugins.pi_support.octopi_version : 0.18.0
env.plugins.pi_support.throttle_state : 0x0
env.python.pip : 20.3.3
env.python.version : 3.7.3
env.python.virtualenv : true
octoprint.safe_mode : false
octoprint.version : 1.6.1
printer.firmware : Marlin 1.1.9 (Github, davidramiro) MARLIN-AI3M_VERSION:v1.4.6
systeminfo.generator : systemapi

Thanks beforehand!
Best regards Max

What page are you trying to embed OctoPrint in? Often you have to setup specific settings as browsers are more and more strict about CORS, cookies and HTTPS connections.

I am embedding octoprint in my own ASP.NET Core website that I use as a home controller. I have enabled the "allow embedding" on octoprint.