peerplays-network / getscatter-walletpack

2 stars 2 forks source link

(XS) Investigate CORS Issue #18

Closed MuffinLightning closed 4 years ago

MuffinLightning commented 4 years ago

CORS Issue when connecting Scatter to testnet

mseaward commented 4 years ago

Based on some poking around in configurations, we are fairly certain of a couple things but are waiting for a verification response from nathan.

  1. CORS is being enabled for local development via npm run prod within the ScatterEmbed repository
    • it will produce the production files
    • it will host said files on a local http server with cors enabled for all
  2. Within electron production, there appears to be a function that disables a security protocol that enables fetch requests to be sent to API endpoint
    • requests will work correctly without CORS configuration by way of disabling a security protocol for chrome

TLDR: fetch requests will function fine within production of the Scatter wallet but will not for regular development environments which is likely why we have been told to verify our plugin is working via unit tests.

cc: @bobinson attaching you to this because IF I am right in what I am saying, a security protocol is deliberately being disabled. I am not 100% of the implications of this as of yet, nor am I sure if this is really what is happening here as there is no well defined instructions on how exactly one would produce binaries from the various scatter repositories. cc: @MuffinLightning