Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Setup React/Redux devtools for electron #25

Closed
Yukaii opened this issue Nov 22, 2016 · 4 comments
Closed

Setup React/Redux devtools for electron #25

Yukaii opened this issue Nov 22, 2016 · 4 comments

Comments

@Yukaii
Copy link
Member

Yukaii commented Nov 22, 2016

Redux devtools would only works with localhost url.

Need to install webpack-dev-server also.

@Yukaii
Copy link
Member Author

Yukaii commented Nov 22, 2016

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 😓

@Yukaii
Copy link
Member Author

Yukaii commented Nov 22, 2016

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

@Yukaii Yukaii closed this as completed in ab73d59 Nov 23, 2016
@Yukaii
Copy link
Member Author

Yukaii commented Nov 23, 2016

see #26

@Yukaii Yukaii mentioned this issue Nov 23, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant