View Single Post
Old 06-06-2020, 12:51 PM   #24
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,382
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The idea is you dont laod any files locally. Even the base HTML file you load via the custom scheme. Then all resources in the file are automatically also loaded via the custom scheme. And JS running from the custom scheme is not allowed access to local files anyway, without even needing the setting. All in all, its about a 100 lines of code. Remember to register your scheme as "trusted" with Qt so that it has the smae semantics as a page loaded over https and it can use html features gated behind https.
kovidgoyal is offline   Reply With Quote