Adding link in dashboard (not a question)

Sharing experience, maybe useful for someone.

One of reasons why I abandoned about dozen UIs and frameworks in last 2 years in favor of Node-RED is NR’s high integrativity.
One example: I have long-time-ago written, launched and working perfectly automated orchid care farm. It’s built over Django (however, it might be any other framework). I could just continue using it as separated site, however, I’d like to see it integrated into NR dashboard.

Adding ready and separated part of smart home into NR dahsboard can be done in 2 ways:

  1. Adding template with link to working site. Good for narrow, width-limited sites.
  2. Adding new tab as link to working site. Good for wide-UI sites.

In my case, both ways presented empty screen since “the working site” over Django has X_FRAME_OPTIONS=“DENY” by default.
Adding X_FRAME_OPTIONS = 'GOFORIT' to settings.py overwrites the default and shows the site content in the dahsboard iframe.

It’s not secure thus. Better approach is mentioning exact list of sources that can use frames.

1 Like