Cross origin policy override
Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/cross-origin-policy-override
Use when you are loading index.html locally in a browser and WebWorker or WebAssembly components fail to initialize with cross-origin or file-access policy errors. This occurs when the default browser file-access policy blocks local resource sharing required by these technologies.From its SKILL.md
npx -y skills add HolobiomicsLab/asb-skill-collections --skill cross-origin-policy-overrideAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.3 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
cross-origin-policy-override
Summary
Modify browser security policies to enable local loading of WebWorker and WebAssembly resources when serving HTML files from the local filesystem. This skill is essential for developing and testing web applications that rely on these technologies without requiring a network-accessible web server.
When to use
You are loading index.html locally in a browser and WebWorker or WebAssembly components fail to initialize with cross-origin or file-access policy errors. This occurs when the default browser file-access policy blocks local resource sharing required by these technologies.
When NOT to use
- Application is already being served from a web server (http:// or https://) — the override is unnecessary and degrades security posture
- WebWorker and WebAssembly resources are being loaded from a CDN or remote origin — use CORS headers or proper server configuration instead
- The application does not use WebWorker or WebAssembly — no policy override is needed
Inputs
- Local index.html file containing WebWorker or WebAssembly references
- Browser executable or configuration interface (Chrome properties, Firefox about:config, Safari preferences)
Outputs
- Modified browser configuration enabling local file access for WebWorker/WebAssembly
- Successfully loaded web application with functional WebWorker and WebAssembly components
How to apply
Identify the target browser (Chrome, Firefox, or Safari) and apply the corresponding configuration mechanism. For Chrome, add the --allow-file-access-from-files flag to the executable target path in browser properties. For Firefox, navigate to about:config and set security.fileuri.strict_origin_policy to false. For Safari, enable 'Disable Local File Restrictions' via the Develop menu after checking 'Show Develop menu in menu bar' in Advanced settings. After applying the configuration, restart the browser and load index.html locally, then verify that WebWorker and WebAssembly components initialize without cross-origin or file-access policy errors. Each browser requires restart to activate the policy change.
Related tools
- Google Chrome (Target browser requiring --allow-file-access-from-files flag to enable local file access for WebWorker and WebAssembly execution)
- Mozilla Firefox (Target browser requiring security.fileuri.strict_origin_policy to be set to false in about:config to allow local resource sharing for WebWorker and WebAssembly)
- Safari (Target browser requiring 'Disable Local File Restrictions' to be enabled via the Develop menu to enable local file access for WebWorker and WebAssembly modules)
- WebWorker (JavaScript API for executing scripts in background threads; cannot be loaded automatically under default file-access policies when run locally)
- WebAssembly (Binary instruction format for running computational code in browsers; cannot be loaded automatically under default file-access policies when run locally)
Evaluation signals
- WebWorker threads initialize without throwing cross-origin or file-access policy exceptions
- WebAssembly modules load and execute without throwing cross-origin or file-access policy exceptions
- Application functionality that depends on WebWorker or WebAssembly operates correctly when index.html is loaded with file:// protocol
- Browser developer console shows no security-related warnings or errors related to local resource access
- Configuration persists across browser restarts (verify by restarting the browser and reloading index.html)
Limitations
- Modifying these settings poses a security risk — do not load any local files unless you are certain they are safe
- Configuration must be reapplied if browser is uninstalled or reset to factory defaults
- The --allow-file-access-from-files flag in Chrome affects all local file access for that browser instance, not just the target application
- Changes to Firefox's security.fileuri.strict_origin_policy apply globally to all local file access in that browser profile
Evidence
- [readme] This program uses WebWorker and WebAssembly, which cannot be loaded automatically when run locally unless you modify your browser settings.: "This program uses WebWorker and WebAssembly, which cannot be loaded automatically when run locally unless you modify your browser settings."
- [intro] Three browser-specific configuration mechanisms enable local file access: (1) Google Chrome requires adding the --allow-file-access-from-files flag to the executable target path; (2) Mozilla Firefox requires setting security.fileuri.strict_origin_policy to false in about:config; (3) Safari requires enabling 'Disable Local File Restrictions' via the Develop menu after checking 'Show Develop menu in menu bar' in Advanced settings.: "Three browser-specific configuration mechanisms enable local file access: (1) Google Chrome requires adding the --allow-file-access-from-files flag to the executable target path; (2) Mozilla Firefox"
- [readme] In the "Target" field, add the following flag to the end of the existing path: --allow-file-access-from-files.: "In the "Target" field, add the following flag to the end of the existing path: --allow-file-access-from-files."
- [readme] Search for security.fileuri.strict_origin_policy in the configuration page. Change its value to false.: "Search for security.fileuri.strict_origin_policy in the configuration page. Change its value to false."
- [intro] Verify each configuration by loading index.html locally and confirming WebWorker and WebAssembly components initialize without cross-origin or file-access policy errors.: "Verify each configuration by loading index.html locally and confirming WebWorker and WebAssembly components initialize without cross-origin or file-access policy errors."
- [readme] Warning: Modifying these settings poses a security risk. Do not load any local files unless you are certain they are safe.: "Warning: Modifying these settings poses a security risk. Do not load any local files unless you are certain they are safe."
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.