dloa / alexandria-browser

Original OIP browsing UI. Outdated. See https://github.com/dloa/browser-react
14 stars 9 forks source link

Set payproc URLs to use https protocol all of the time. #32

Closed cchrysostom closed 8 years ago

cchrysostom commented 8 years ago

The server, api.alexandria.io, now returns a 301 error (permanently moved resource) when accessing "http://api.alexandria.io/payproc/..." In Chrome and Safari, this causes a failure which prevents the paywall from displaying because a payment address never returns to the invoking http client (window.location.protocol == 'http'). In Firefox, when window.location.protocol == http, it recognizes the 301 error and navigates to the https://api.alexandria.io/payproc address as provided in the location header. Thus, in Firefox, the paywall displays regardless of how alexandria.io was originally accessed (via http or https).

This change forces the browser to always use the https protocol, which works with both Chrome and Firefox.