flowfuse icon indicating copy to clipboard operation
flowfuse copied to clipboard

Allows httpNodeCors to be configured for a NR under the device agent.

Open hardillb opened this issue 9 months ago • 1 comments

Description

To allow API endpoints or dashboard to be loaded from different sources this needs to be added to the settings.js for the Node-RED instance under the Device agent.

I suggest it becomes something that can be added to the device.yml to be included.

requested by customer:

https://app-eu1.hubspot.com/contacts/26586079/record/0-2/7157221333

Which customers would this be available to

Everyone - CE/Starter/Team/Enterprise

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

hardillb avatar Mar 28 '25 18:03 hardillb

From the default NR settings.js

    /** The following property can be used to configure cross-origin resource sharing
     * in the HTTP nodes.
     * See https://github.com/troygoode/node-cors#configuration-options for
     * details on its contents. The following is a basic permissive set of options:
     */
    //httpNodeCors: {
    //    origin: "*",
    //    methods: "GET,PUT,POST,DELETE"
    //},

hardillb avatar Mar 28 '25 18:03 hardillb

Is that a sensible thing to just be throwing in for all Node-RED instances running via the Agent? Not clear to me if this is still a priority, @gstout52 will let you assign/shift accordingly.

joepavitt avatar Aug 01 '25 11:08 joepavitt

@hardillb Can you say more about what value this change will bring to the user?

gstout52 avatar Aug 01 '25 17:08 gstout52

This allows dashboards hosted in devices to be embedded in other webpages

@joepavitt The suggestion is to make it configurable Either in the FF UI or via the device.yml file

hardillb avatar Aug 01 '25 18:08 hardillb

The device-agent part of this was completed under FlowFuse/device-agent#241

hardillb avatar Aug 07 '25 14:08 hardillb

Waiting for 2.21.0 release day so we don't have to spin new Stack containers.

hardillb avatar Aug 15 '25 14:08 hardillb