Subdomain -> Subdirectory with Worker getting MIME error

I am trying to configure my website where if someone access mysite.com/a will fetch the content from a.mysite.com, I have added the worker to the route also.

it works fine on Worker Sandbox, but when I tried to access from the actual browser it shows me error message: Refused to execute the script from “mysite” because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled

Anyone could give me assistance on it, please?