Comments (3)
@dingjiayi Thanks for your report. I'd like to clarify one thing.
endpoint receive request with host head: Host: host_name:8080
Do you mean the Host
header as part of the Kong request log sent by the http-log plugin? Or the Host
header of the request that was used to send the Kong request log?
My understanding is that you configured the http-log plugins using http_endpoint="http://host_name:8080/log"
, and the logging server received a logging request from this plugin, and the Host
header of this request is host_name
instead of host_name:8080
. Am I right?
from kong.
My understanding is that you configured the http-log plugins using http_endpoint="http://host_name:8080/log", and the logging server received a logging request from this plugin, and the Host header of this request is host_name instead of host_name:8080. Am I right?
Right. Sorry for my unclear description.
This is caused by line 117 ["Host"] = host,
as blow
kong/kong/plugins/http-log/handler.lua
Lines 116 to 121 in 4e006aa
If it's confirmed to be a bug, I would be willing to submit a PR to fix it.
I think it could be resolved by directly removing the code on line 117. Just like many other HTTP client libraries, lua-resty-http automatically sets the Host header in the underlying layer when the upper-layer request doesn't have a Host header set.
from kong.
My understanding is that you configured the http-log plugins using http_endpoint="http://host_name:8080/log", and the logging server received a logging request from this plugin, and the Host header of this request is host_name instead of host_name:8080. Am I right?
Right. Sorry for my unclear description.
This is caused by line 117
["Host"] = host,
as blowkong/kong/plugins/http-log/handler.lua
Lines 116 to 121 in 4e006aa
If it's confirmed to be a bug, I would be willing to submit a PR to fix it.
I think it could be resolved by directly removing the code on line 117. Just like many other HTTP client libraries, lua-resty-http automatically sets the Host header in the underlying layer when the upper-layer request doesn't have a Host header set.
I think this is a bug, PR is welcome. @dingjiayi
from kong.
Related Issues (20)
- How to store config info in kong HOT 3
- Strings in luajit are infinitely bloated, even if they are not rereferenced in the lua vm HOT 1
- Strings in luajit are infinitely bloated, even if they are not rereferenced in the lua vm HOT 3
- Kong 3.7.1 Exponential memory growth over time. HOT 16
- Failure to enable openid-connect plugin HOT 4
- Kong DP keep restarting HOT 3
- Error occurs on endpoints when `tags` parameter is empty HOT 1
- Postgres read/write primary node seeming timeouts led to runtime traffic failures on existing runtime proxies HOT 2
- ip address based rate-limiting does not use real client ip address but last proxy ip address HOT 4
- [healthchecks] failed setting peer status (upstream: 7b069e34-9542-48cb-8a16-15eb144a3e5d:rest-service-upstream): not a known address, context: ngx.timer HOT 6
- [key-auth]: Query parameters truncated to first 100 when `hide_credentials` is set to true HOT 7
- Self-signed certificate error upon hitting proxy-URL in kong HOT 3
- The upstream_response_time in kong's access.log is much larger than the actual processing time of the upstream service HOT 3
- docker compose setup not working HOT 2
- the incorrect certificate name HOT 1
- Inconsistent TLS Verify behavior between Nginx and Kong Service level TLS configuration
- ai-proxy nil error with bedrock misconfiguration HOT 1
- Timeout in liveness / readiness probes leading to outage HOT 2
- [response-ratelimiting] Missing upstream usage headers in Kong 3.8 HOT 2
- `"validations.kong.konghq.com" denied the request: consumer already exists` error in isolated namespaces HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kong.