Hi,
See code I am using with http.server with JSROOT.
It adds extra headers for CORS. You can do the same approach.
Regards, Sergey