Closed gmarty closed 8 years ago
AFAIK, the registration server support CORS:
https://github.com/fxbox/registration_server/blob/master/src/routes.rs#L100
I think we could be hitting a problem caused by the tls proxy that @michielbdejong setup in port 4243.
@gmarty which registration URL are you using?
The registration server doesn't seem to work for me anymore. Firefox fails silently (nothing in the network tab of dev tools) and Chrome shouts:
Fetch API cannot load https://knilxof.org:4243/ping. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
That's weird, actually I don't think changes by @michielbdejong are causing any problem, I can see the request green on my firefox.
With what command do you start the box?
Ok, no problem with the proxy, we just need version matching for the registration process and the latest version of the registration server:
We discussed on irc that the TLS-offloading proxy that runs on port 4243 hides the client's remote IP address from the registration server, so the registration server will always record '127.0.0.1' as the public IP address, and pools everybody's Boxes and clients into one pool. This might be what caused the malfunction? An easy way to test is to undo https://github.com/fxbox/app/pull/12/files
This was fixed by #14
It seems that the registration server doesn't serve CORS headers.
It should have at least a Access-Control-Allow-Origin header.