Hi all, like many people I'm running up against the limitations of the file:// protocol when loading local JS files in my CEF app (CORS errors and incorrect mime types). Based on what I've read here and on the wiki, I planned to solve this by making a CefSchemeHandlerFactory that returns my own CefResourceHandler, which I can use to load URLs that look like
http://myapp/path/to/local/file, to replace
file://path/to/local/file. Now that I'm starting to implement the CefResourceHandler I realize I have to reimplement _everything_, including deducing mime types for whatever files might be opened. I'd rather not duplicate so much logic and would prefer to defer to the default resource handler for most of this functionality -- e.g. I could intercept a request for
http://myapp/path/to/local/file, convert it into
file://path/to/local/file, use the default resource handler to generate response headers, then amend those response headers with my own (basically I want to add CORS headers and set the mime type for .js files), and return it. Is this possible? Or is there an easier way than re-implementing all of this in a custom CefResourceHandler? Thanks!