Skip to content

HTTP header X-Forwarded-Proto not defined correctly on the backend app #13478

Closed Answered by ProBrian
iuriipro asked this question in Help
Discussion options

You must be logged in to vote

Hi @iuriipro I've reproduced your issue, since https is a string, you need to quote it, try change it to:

apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
...
plugin: post-function
config:
  access:
    - |
      ngx.var.upstream_x_forwarded_port=443
      ngx.var.upstream_x_forwarded_proto="https"

Then you will get the upstream_x_forwarded_proto variable correctly.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@iuriipro
Comment options

Comment options

You must be logged in to vote
1 reply
@iuriipro
Comment options

Answer selected by iuriipro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants