Closed bobbingwide closed 7 years ago
The initial solution appears to work on Chrome on a laptop but not on my iPad.
The daily trace summary log indicates that no REST requests are being processed.
Further investigation led to issue #8.
This issue was fixed in https://github.com/bobbingwide/react-SB/commit/4faf2857604f99e3256552b7a1a575507f738157
The demoApi class ( in rest-api.js file ) needs to know the url to which the REST API requests should be directed. This is currently hardcoded in the const BIGRAM_URL as http://localhost/bigram, equivalent to http://qw/bigram.
Requirement
We need a solution that will work when the real target site is http://bigram.co.uk
Proposed solution
Use window.location.hostname and window.location.protocol If hostname is localhost or qw then set BIGRAM_URL to qw/bigram else set it to the hostname