Loading local file with `local-resource://` throws CORS error
See original GitHub issueHi 👋
I’m following the documentation and registered a file protocol to load local files without having to set webSecurity: false
.
But I get this CORS error:
Access to audio at 'yiddishe-kop-protocol:///Users/.../Library/Application Support/jkaraoke-desktop/blob/9' from origin 'http://localhost:8080' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, https.
Here is a link to my background.js
file.
And a link to my <audio>
element that is trying to use the protocol.
For now I’ll just be setting webSecurity: false
, but this is strongly discouraged…
Environment: System: OS: macOS 10.15.6 CPU: (8) x64 Intel® Core™ i7-6920HQ CPU @ 2.90GHz Binaries: Node: 12.18.1 - /usr/local/opt/node@12/bin/node Yarn: 1.19.2 - ~/.npm/bin/yarn npm: 6.14.4 - ~/.npm/bin/npm npmPackages: @ant-design-vue/babel-helper-vue-transform-on: 1.0.1 @vue/babel-helper-vue-jsx-merge-props: 1.0.0 @vue/babel-plugin-transform-vue-jsx: 1.1.2 @vue/babel-preset-app: 4.5.4 @vue/babel-preset-jsx: 1.1.2 @vue/babel-sugar-functional-vue: 1.1.2 @vue/babel-sugar-inject-h: 1.1.2 @vue/babel-sugar-v-model: 1.1.2 @vue/babel-sugar-v-on: 1.1.2 @vue/cli-overlay: 4.5.4 @vue/cli-plugin-babel: ~4.5.0 => 4.5.4 @vue/cli-plugin-pwa: ~4.5.0 => 4.5.4 @vue/cli-plugin-router: ~4.5.0 => 4.5.4 @vue/cli-plugin-vuex: ~4.5.0 => 4.5.4 @vue/cli-service: ~4.5.0 => 4.5.4 @vue/cli-shared-utils: 4.5.4 @vue/component-compiler-utils: 3.1.2 @vue/preload-webpack-plugin: 1.1.1 @vue/web-component-wrapper: 1.2.0 portal-vue: ^2.1.7 => 2.1.7 vue: ^2.6.11 => 2.6.11 vue-class-component: 7.2.3 vue-cli-plugin-electron-builder: ~1.4.6 => 1.4.6 vue-hot-reload-api: 2.3.4 vue-loader: 15.9.2 (16.0.0-beta.3) vue-property-decorator: 8.5.1 vue-router: ^3.2.0 => 3.3.2 vue-slider-component: ^3.2.5 => 3.2.5 vue-style-loader: 4.1.2 vue-template-compiler: ^2.6.11 => 2.6.11 vue-template-es2015-compiler: 1.9.1 vuex: ^3.4.0 => 3.5.1 vuex-electron: ^1.0.3 => 1.0.3 npmGlobalPackages: @vue/cli: 4.2.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
@D4RKAR117 It doesn’t seem to fix the issue. I still get the same CORS error.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don’t have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.