node.jsencryptionnode-red

make my node-red flow only run my node-red


I'm going to encrypt my node-red flow in case others export my node-red flow and import it into a node-red that is not deployed by me. In other words, I want to make my exported flow can only run on my node-red.

I've try to read the source of node-red projet, but I didn't find any code or api about exporting flow or importing flow. I want to know where they are to add my code. Or are there any other solutions to make my need?


Solution

  • The export function is in the editor code (frontend)

    The function that shows the export dialogue is here:

    https://github.com/node-red/node-red/blob/9bd71319143a26f654810d0d05ccc08c7603a95d/packages/node_modules/%40node-red/editor-client/src/js/ui/clipboard.js#L565