I did not meant that you should include all assets in one build. I tried to suggest that you could do multiple builds one for each origin. Something like:
BUILD_FOR_ORIGIN=foo.com ember build --prod --output-path=dist/foo.com
BUILD_FOR_ORIGIN=bar.com ember build --prod --output-path=dist/bar.com
ember build --prod --output-path=dist/default
Upload all builds to your webserver and configure it to serve the correct build depending on request.
This does only work if you know the list of build variants beforehand. And it has a huge impact on time needed to do a full deployment. But it’s far easier and does not have as much edge cases as manipulating the build output.
That approach has an impact on timing. The dynamic assets won’t be loaded until full application is booted. That might be okay for your use case but could cause issues. I just wanted to mention it for other people coming across this thread.