Skip to content

CORS proxy

Juhana Leinonen edited this page Nov 28, 2016 · 2 revisions

Web sites can't load resources from other domains because of browser security restrictions. The solution is to have the server download the file and pass it to the interpreter from its own domain, or from a location that specifically allows cross-domain requests. HugoJS uses Parchment's proxy to load game files from other domains.

If you don't want to use the Parchment proxy, there's a CORS proxy script for PHP included with the project (click "Raw" and save page). The script is PHP CORS Proxy by Iacovos Constantinou. It's been modified to accept only .hex files.

To install the PHP proxy, download it and place it in the same directory as the interpreter. In the options object set the proxy_url option to "proxy.php?csurl=%s" and the use_proxy option to "auto" or "always".

Clone this wiki locally