apache / apache/openwhisk-apigateway

x-forwarded-port makes little sense

Open
#310 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
65
Forks
43
PR merge metrics
No merged PRs in 30d

Description

Given that I have an API gateway set up like this: `wsk api create /base /test GET test -n testapi --response-type http`, then I can access it like this:

```
$ curl https://service.eu.apiconnect.ibmcloud.com/gws/apigateway/api/2fb...be1/base/test
```

Inspecting `__ow_headers`, I find this:
```
"x-forwarded-url": "https://service.eu.apiconnect.ibmcloud.com/gws/apigateway/api/2fb...be1/base/test",
"x-forwarded-port": "8080",
```

The URL is correct, but the port should be `443`.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the API gateway request with the shown curl command and inspect __ow_headers, focusing on how x-forwarded-port is generated alongside x-forwarded-url. Done means an HTTPS request through the gateway reports port 443 instead of 8080 while preserving the correct forwarded URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.