NOTE: The key name may change based on the firefox version, this is valid till firefox version Mozilla Firefox 125.0.2,
- Open Firefox and type about:config in the address bar.
- Accept the warning about changing advanced settings.
- Search for security.fileuri.strict_origin_policy and set it to false.
- Once the testing is completed, set security.fileuri.strict_origin_policy back to true
NOTE: These steps are for Unbuntu OS
- Make sure your chrome browser is closed.
- Open terminal and run the following command
google-chrome --disable-web-security --user-data-dir
- Remember that disabling CORS can expose your browser to security risks, so it's essential to revert these changes after testing:
- Close the Chrome instance that was launched with CORS disabled.
- Open Chrome normally (without any special flags) for regular browsing.
CAUTION: This change disables CORS restrictions for local file access, but it's not recommended for general browsing due to security implications.