Skip to content

Is there any way to specify a custom origin/referer/host? #714

Closed

Description

@ekaradon

Hello,

First, thanks for this project, it is really great!

I want to use it in an existing project because everything looks better with it. However I have to use a custom host project.dev.lan in order to be authorized by the backend part. Is it possible to customize this part without running npm run eject?
I have seen the proxy part, but it does not change the host part in the http header request (origin and referer fields). Is there any way to force it?

I also have to set the port as 80 and not 3000. I know that we can do that through environment variables but I would prefer to have a overriding configuration file. It is easier to make it works on different OS. Same thing for the HTTPS. I prefer a file over an environment variable.

Thank you,

Activity

  1. gaearon commented on Sep 23, 2016

    @gaearon
    Contributor

    #695 will add support for environment overrides file so you'll be able to specify PORT and HTTPS there. Would adding support for HOST be enough for your needs?

  2. ekaradon commented on Sep 23, 2016

    @ekaradon
    ContributorAuthor

    Yep, definitely. The origin and referer fields are deduced through the host and the resource path. So it would work.

  3. gaearon commented on Sep 23, 2016

    @gaearon
    Contributor

    Happy to review a PR adding support for this. Would you like to work on it?

  4. ekaradon commented on Sep 23, 2016

    @ekaradon
    ContributorAuthor

    OK. Let's do this.

  5. ekaradon commented on Sep 23, 2016

    @ekaradon
    ContributorAuthor

    Here:
    #717

  6. added this to the 0.5.0 milestone on Sep 23, 2016
  7. gaearon commented on Sep 23, 2016

    @gaearon
    Contributor

    Fixed via #717. Thanks!

  8. locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions