Is there anyway to change the path generated in blaze to include full domain name?

currently in the templates, the scripts files are included as

Is there anyway to change that to include the fully qualified domain name, such as:

any help will be appreciated!

Well, here’s a line from the boilerplate file used to generate the default HTML page:

<script type='text/javascript' src='{{rootUrlPathPrefix}}{{pathname}}'></script>

rootUrlPathPrefix can be set via the Meteor environment variable ROOT_URL_PATH_PREFIX, so maybe you can leverage that environment variable to do what you want. That being said I have a feeling the boilerplate generator won’t allow you to use full hostnames in the ROOT_URL_PATH_PREFIX (since that could be a mess when used with ROOT_URL), but I haven’t dug into the code to find out. If you’re interested, you can likely find the answer in the Meteor webapp package.

Thank you for that.

I tried setting the ROOT_URL_PATH_PREFIX, and that didn’t work. So I looked into the meteor source and found that the ROOT_URL_PATH_PREFIX is driven from ROOT_URL, it takes the ROOT_URL.pathname. And I also tried setting the meteor_runtime_config.ROOT_URL_PATH_PREFIX at Meteor.startup, but there’s logic in the webapp_server app.use to check and make sure the prefix starts with “/”…lol, and it’s not a named method, so I don’t see a way to override that. I guess the road ends there.

Do you know if there’s a way to override the boilerplate file?