I found this blog, and it have a solution,
Adding request headers to image requests using a service worker