Skip to content

question: Is X-Forwarded-Proto set correctly? #92

Open
@joncfoo

Description

@joncfoo

I'm invoking devd with the command below and accessing my application over https://devd.io/. I noticed in my application that X-Forwarded-Proto = http - shouldn't it be https since I am forwarding /=https://127.0.0.1:3000/ ?

devd --port=443 \
	--cert=_certs/devd.io/bundle.pem \
	/=https://127.0.0.1:3000

Changing the following line in reverseproxy.go to req.Header.Set("X-Forwarded-Proto", target.Scheme) results in X-Forwarded-Proto being set to https (it works for my use-case but I'm not sure if this is the right fix?).

req.Header.Set("X-Forwarded-Proto", req.URL.Scheme)

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