Add query string to .js and requests

We are in the process of rebuilding our application in Vue.js SPA. JavaScript and sourcemap files are successfully being submitted to the sentry application and we get issues being reported on the release. While we are in the process of our rebuild we are managing incoming traffic on a percentage basis for reporting and error data to fine tune the last phases. We are handling the traffic split via a cookie being set by Varnish after checking for a application_spa=true query in the URL. On the dashboard we can see that the .js and files are being requested from the old site and is being managed by the same dynamic and getting 404 errors. How can we add either the query string to the requests for these files, or identify the request on our servers to manage the cookie and deliver the correct files?

Thank you for any assistance.

an example of this would be:

where should be to be able to access the files.