In a test application, I have several dns records pointing to it, and I have a folder where I keep specific codes for each source.
What I want to avoid is the possibility of requesting content from one site to another, but the problem is that all queries for the internal elements of the Meteor are evaluated first.
Ex:
/imports/@/bulica.local/index.js
/imports/@/caneco.local/index.js
/imports/@/192.168.0.1/index.js
and /server/index.js in the first few instructions:
WebApp.connectHandlers.use('/imports/@/', (req, res, next) => {
// aqui vai minha lógica que compara
// req._parsedUrl.pathname com req.headers['x-forwarded-server']
});
The issue is that it is possible for one domain to access code from another through url, because Meteor always evaluates what exists in WebApp.clientPrograms ['web.browser'] first, delivering the file. This logic is only processed if the url does not marry anything that the Meteor has already "compiled"
How to solve this? I have no idea how to do this in Apache, which also occurred to me