If you have nginx or some other reverse proxy in front of NodeBB, you can use that to set the response header.
Adding support to Google Maps API
Under what heading in plugin.json shall I specify the link to this external third-party script:
Also I do not want the API key exposed to the end users of the resulting HTML file.
To further clarify, the order of sequence of execution of scripts should be ...