Skip to content

Origin erases port #4

@RBerga06

Description

@RBerga06

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions