stevenyvr987 / overdrive-evergreen-opac

Automatically exported from code.google.com/p/overdrive-evergreen-opac
0 stars 0 forks source link

Proxying of OD API URLs is not 100% correct #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If the Javascript client needs to make an OD API request, it will use the true 
API URL, but before sending the request to the EG server, it will change the 
URL to one located within the EG server name space. At the EG server, it will 
perform a 'reverse proxy', ie, change the URL from local name space back to the 
true URL and then re-issue the request to the OD server.

Currently, if https:// is used, all API requests are ok; if http:// is used, 
some requests are ok but some get issued to an incorrect URL, resulting in 
failure.

Original issue reported on code.google.com by steven3...@gmail.com on 1 Aug 2014 at 7:58

GoogleCodeExporter commented 9 years ago

Original comment by steven3...@gmail.com on 1 Aug 2014 at 8:00

GoogleCodeExporter commented 9 years ago
Fixed by removing the http: or https: protocol string from the URL. This makes 
the URL use 'relative' protocol, which defaults to the protocol used by the web 
browser. The browser will use http when the user is not logged, otherwise, it 
uses https. This convention is suitable for OD api calls.

Original comment by steven3...@gmail.com on 4 Aug 2014 at 9:12