Comments (4)
Problem
Fetch not works with webpack dev server.
Trials
- use
fetch({mode: 'cors'})
- use electron api to overwrite request
Origin
header => not works, because of preflight.
Might need some mechanism to bypass CORS limitation. Some Ideas:
- Request from electron node api. Like what puraku does. Need a overall API re-wrapped.
- Research for electron capabilities...?
- Wireshark dm5 official app to get their customized API endpoints?
- Or just forget the devtools and keep going 😓
from app.
After ten more minutes googling, I found out that you only need to disable web security option in BrowserWindow API.
See 2c47a3a
webPreferences: {
webSecurity: false
}
References
- https://github.com/electron/electron/blob/master/docs/api/browser-window.md#new-browserwindowoptions
from app.
Other Resources
- whatwg/fetch#210
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
- https://developer.mozilla.org/en-US/docs/Web/API/Request/mode
from app.
see #26
from app.
Related Issues (20)
- Move to TypeScript
- Add gitter badge
- Notification Center
- Open first chapter by default
- Run update checker on start
- Optimize webpack bundle HOT 1
- README 加上安裝和啟動說明應該會更好? HOT 3
- Remove collection/user preference out of Firebase HOT 3
- Webpack dev server HMR not works
- 研究 Plugin Pattern
- i18n
- iTunes-like Album expanding effect
- Comics Show Page
- Implement Virtual Scroll
- deb: Lintian: E: comics-reader-electron: shlib-with-executable-bit opt/Comics Reader/libnode.so 0755 HOT 1
- deb: 資源目錄權限錯誤,造成無法啟動應用 HOT 1
- hi 你好 我是 comics scroller 的原作者 HOT 1
- Is this project dead?
- Move completely to server-side architecture
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app.