I have just tried using rocket_ext in a project of mine and it looks like it works well, but when I send a CORS request from e.g. Origin: http://localhost:3000, the server (running locally at http://localhost:8000) responds with the header Access-Control-Allow-Origin: http://localhost and, as a result, my browser denies the request (saying Access-Control-Allow-Origin: does not match request's Origin: header).
I have had a brief look at the source code and I think the problem might be that the Origin struct does not store port information (and ports are not tested anywhere). Would you accept a PR for this?
I have just tried using
rocket_extin a project of mine and it looks like it works well, but when I send a CORS request from e.g.Origin: http://localhost:3000, the server (running locally athttp://localhost:8000) responds with the headerAccess-Control-Allow-Origin: http://localhostand, as a result, my browser denies the request (sayingAccess-Control-Allow-Origin:does not match request'sOrigin:header).I have had a brief look at the source code and I think the problem might be that the
Originstruct does not store port information (and ports are not tested anywhere). Would you accept a PR for this?