Override Meteor.settings.public

For testing purposes, I need to override Meteor.settings.public on the server to be served to a client. But if I change Meteor.settings.public on the server, it is changed on the server only. Clients still get the old version when they load the app. What would be the right strategy to override it on the server so that I get the changed version on the client? I tried setting __meteor_runtime_config__.PUBLIC_SETTINGS, but I am still seeing the same behaviour.

Found it. Call

var generateBoilerplate = WebAppInternals.generateBoilerplate;
generateBoilerplate();

to regenerate all boilerplate HTML templates which have the settings inside them.

Why I first need to set the function to a local variable I would be eager to find out.