Skip to content

Commit

Permalink
fixes for less common url loads
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Mar 27, 2024
1 parent 74cfc5e commit 0f55f5c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -709,12 +709,11 @@ var Module = null;

// NOTE: deliberately use cors.archive.org since this will 302 rewrite to iaXXXXX.us.archive.org/XX/items/...
// and need to keep that "artificial" extra domain-ish name to avoid CORS issues with IE/Safari (tracey@archive)
var get_cors_url = function(item, path = '') {
if (path.endsWith('.xml') || path.endsWith('.bin') || path.endsWith('.swf'))
return '//cors.archive.org/cors/' + item + (path ? '/' + path : '');
var get_cors_url = function(item, path) {
if (item === 'emularity-engine' || item === 'emularity-config' || item === 'emularity-bios')
return '//' + item + '.dev.archive.org/' + (path ? '/' + path : '');

// eg: emularity-engine emularity-config emularity-bios
return '//' + item + '.dev.archive.org/' + (path ? '/' + path : '');
return '//cors.archive.org/cors/' + item + (path ? '/' + path : '');
}

var get_emulator_config_url = function (module) {
Expand Down

0 comments on commit 0f55f5c

Please sign in to comment.