I am following this article https://awsteele.com/blog/2022/10/15/cheap-serverless-containers-using-api-gateway.html to set up a cost-saving apigateway to fargate path using cloudmap instead of alb.
My app is on port 5230. When I finish set up and deploy APIGateway, it throws the error in the console.
caught (in promise) TypeError: Failed to register a ServiceWorker for scope ('https://xxxxxx.execute-api.us-east-1.amazonaws.com/') with script ('https://xxxxxx.execute-api.us-east-1.amazonaws.com/sw.js'): A bad HTTP response code (404) was received when fetching the script.
sw.js is registered in my index.html like this navigator.serviceWorker.register("/sw.js")
;, looks like APIGateway is trying to find files locally. Wonder how can I do to resolve this , thank you!
I tried to turn off serviceWorker in chrome but it throws same type of error trying to find local resources.