mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[GH-ISSUE #1191] [Enhancement]: x-frame-options and frame-ancestors headers break Home Assistant iframe embedding for local deployments #862
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#862
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @azurusnova on GitHub (May 2, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/1191
Originally assigned to: @maziggy on GitHub.
Component
Bambuddy
Bug Description
The security headers added in recent versions (x-frame-options: SAMEORIGIN and frame-ancestors 'none' in the Content-Security-Policy) break Bambuddy's ability to be embedded in Home Assistant's Webpage dashboard panel for users running both on a local network.
Bambuddy is running as a local add-on on Home Assistant OS on the same LAN as the HA instance with no external exposure. The HA Webpage dashboard panel is used to embed Bambuddy directly into the HA sidebar, making it accessible from both the desktop browser and the HA mobile app without needing to open a separate browser tab or remember a separate URL.
Since the security headers were introduced, the browser blocks Bambuddy from loading inside HA's iframe panel. The root cause was confirmed via curl:
x-frame-options: SAMEORIGIN
content-security-policy: ... frame-ancestors 'none';
frame-ancestors 'none' completely blocks embedding from any origin, including same-LAN trusted sources. Since HA runs on port 8123 and Bambuddy on port 8000, they are treated as different origins even on the same machine. Bambuddy works fine when accessed directly in a browser tab — the issue is exclusively with iframe embedding.
Expected Behavior
Bambuddy should load inside Home Assistant's Webpage dashboard panel (iframe) when both services are running on the same local network. Prior to the security headers being added, this worked without issue.
Ideally an environment variable such as ALLOW_IFRAME=true or TRUSTED_FRAME_ORIGINS should be available so users running Bambuddy in trusted local environments can disable or relax these headers without affecting the default secure behavior for internet-exposed deployments.
Steps to Reproduce
Printer Model
None
Bambuddy Version
0.2.3.2
SpoolBuddy Version
No response
Printer Firmware Version
No response
Installation Method
Docker
Operating System
Linux (Ubuntu/Debian)
Relevant Logs / Support Package
No response
Screenshots
No response
Additional Context
This affects any user who has integrated Bambuddy into Home Assistant using the Webpage dashboard panel, which is currently the recommended method for HA integration given Bambuddy does not support HA Ingress. The iframe embedding approach worked in earlier versions of Bambuddy and broke when the security headers were introduced. A simple environment variable to control this behavior would resolve the issue for local/trusted deployments while keeping the default behavior secure for externally exposed instances.
Checklist
@maziggy commented on GitHub (May 2, 2026):
Available/Fixed in branch dev and available with the next release or daily build. Please let me know if it works for you.
Docs -> https://wiki.bambuddy.cool/getting-started/docker/?h=embeddi#environment-variables
If you find Bambuddy useful, please consider giving it a ⭐ on GitHub — it helps others discover the project!