Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iFrame integration not working for status page #1146

Closed
2 tasks done
KRider92 opened this issue Jan 8, 2022 · 5 comments
Closed
2 tasks done

iFrame integration not working for status page #1146

KRider92 opened this issue Jan 8, 2022 · 5 comments
Labels
area:status-page Everything related to the status page feature-request Request for new features to be added

Comments

@KRider92
Copy link

KRider92 commented 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

@KRider92 KRider92 added the bug Something isn't working label Jan 8, 2022
@louislam louislam added invalid This doesn't seem right help feature-request Request for new features to be added and removed bug Something isn't working invalid This doesn't seem right help labels Jan 10, 2022
@Sloth-on-meth
Copy link

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

@jareau
Copy link

jareau commented Mar 27, 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.

@InsaneSplash
Copy link

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

@JWilson5607
Copy link

JWilson5607 commented 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

@CommanderStorm CommanderStorm added area:status-page Everything related to the status page area:core issues describing changes to the core of uptime kuma and removed area:core issues describing changes to the core of uptime kuma labels Dec 8, 2023
@CommanderStorm
Copy link
Collaborator

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:status-page Everything related to the status page feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

7 participants