iFrame integration not working for status page #728

Closed
opened 2026-02-28 01:55:55 -05:00 by deekerman · 5 comments
Owner

Originally created by @Marian-Lein on GitHub (Jan 8, 2022).

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

iFrame integration not working for status page when providing -e UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN=1 as an environment variable to the docker container.
This is problematic because the status page provides a structured overview, instead of the alphabetically sorted list.

👟 Reproduction steps

When using an iFrame to integrate uptime-kuma to another page, this works for the /list, but not the /status page

Working example:

<html>
	<head></head>
	<body><iframe style="width:25%; height:99%; border:0" scrolling="no" src="http://_example.com_/list">test</iframe></body>
</html>

Nonfunctional example:

<html>
	<head></head>
	<body><iframe style="width:25%; height:99%; border:0" scrolling="no" src="http://_example.com_/status">test</iframe>/body>
</html>

👀 Expected behavior

iFrame should display (same as with /list).

😓 Actual Behavior

Web console shows error
Refused to display 'http://example.com/' in a frame because it set 'x-Frame-Options' to 'sameorigin'

🐻 Uptime-Kuma Version

1.11.3

💻 Operating System and Arch

Raspbian Linux 5.10.89-v7l+

🌐 Browser

Google Chrome 97.0.4692.71 x64

🐋 Docker Version

20.10.12

🟩 NodeJS Version

v10.24.0

📝 Relevant log output

No response

Originally created by @Marian-Lein on GitHub (Jan 8, 2022). ### ⚠️ Please verify that this bug has NOT been raised before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### Description iFrame integration not working for status page when providing `-e UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN=1` as an environment variable to the docker container. This is problematic because the status page provides a structured overview, instead of the alphabetically sorted list. ### 👟 Reproduction steps When using an iFrame to integrate uptime-kuma to another page, this works for the `/list`, but not the `/status` page Working example: ``` <html> <head></head> <body><iframe style="width:25%; height:99%; border:0" scrolling="no" src="http://_example.com_/list">test</iframe></body> </html> ``` Nonfunctional example: ``` <html> <head></head> <body><iframe style="width:25%; height:99%; border:0" scrolling="no" src="http://_example.com_/status">test</iframe>/body> </html> ``` ### 👀 Expected behavior iFrame should display (same as with /list). ### 😓 Actual Behavior Web console shows error `Refused to display 'http://example.com/' in a frame because it set 'x-Frame-Options' to 'sameorigin'` ### 🐻 Uptime-Kuma Version 1.11.3 ### 💻 Operating System and Arch Raspbian Linux 5.10.89-v7l+ ### 🌐 Browser Google Chrome 97.0.4692.71 x64 ### 🐋 Docker Version 20.10.12 ### 🟩 NodeJS Version v10.24.0 ### 📝 Relevant log output _No response_
Author
Owner

@Sloth-on-meth commented on GitHub (Jan 26, 2022):

having this same issue - i want to embed the status page into my error pages :P

@Sloth-on-meth commented on GitHub (Jan 26, 2022): having this same issue - i want to embed the status page into my error pages :P
Author
Owner

@jareau commented on GitHub (Mar 26, 2022):

Having same problem. I want to embed the /status page into a MagicMirror project. Getting the same refused to display error.

Edit:
This
-e UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN=1
worked for me in a plain html page. I was able to get the iframe to load. Next for me, work in MagicMirror to see if I can get it to load in there.
Cheers.

@jareau commented on GitHub (Mar 26, 2022): Having same problem. I want to embed the /status page into a MagicMirror project. Getting the same refused to display error. Edit: This -e UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN=1 worked for me in a plain html page. I was able to get the iframe to load. Next for me, work in MagicMirror to see if I can get it to load in there. Cheers.
Author
Owner

@InsaneSplash commented on GitHub (Jun 3, 2022):

I'd be interested in this but running it through pm2 and not a docker instance.

@InsaneSplash commented on GitHub (Jun 3, 2022): I'd be interested in this but running it through pm2 and not a docker instance.
Author
Owner

@JWilson5607 commented on GitHub (Jul 27, 2022):

@jareau - can you specify how you added the fix to uptime kuma? I am running it in docker on my unraid box and want to embed it into my magic mirror, but not sure how to apply the fix. I can see it being adding something to the docker config for the app, but not sure if it was in magic mirror that you did this.

Edit - Added a variable to the template and set UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN to true

@JWilson5607 commented on GitHub (Jul 27, 2022): > @jareau - can you specify how you added the fix to uptime kuma? I am running it in docker on my unraid box and want to embed it into my magic mirror, but not sure how to apply the fix. I can see it being adding something to the docker config for the app, but not sure if it was in magic mirror that you did this. Edit - Added a variable to the template and set UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN to true
Author
Owner

@CommanderStorm commented on GitHub (Jan 17, 2024):

@KRider92
The correct envionment variable value is true (not 1).
This might have changed in the last 1.5 years, idk.

Here are the relevant wiki pages:

Closing as resolved

@CommanderStorm commented on GitHub (Jan 17, 2024): @KRider92 The correct envionment variable value is `true` (not `1`). This might have changed in the last 1.5 years, idk. Here are the relevant wiki pages: - setting up iframes: https://github.com/louislam/uptime-kuma/wiki/Status-Page#custom-subdirectory--custom-html-on-status-pages - environment variables: https://github.com/louislam/uptime-kuma/wiki/Environment-Variables#server-environment-variables Closing as resolved
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#728
No description provided.