-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix: can not get hostname in redhat #12267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
f2287a3
7ea0897
c42db6f
7c07f93
c7d1f6d
2c4c444
ac6504b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -393,3 +393,24 @@ res:nil | |
| res:5 | ||
| res:12 | ||
| res:7 | ||
|
|
||
|
|
||
|
|
||
| === TEST 13: gethostname | ||
| --- config | ||
| location /t { | ||
| content_by_lua_block { | ||
| local core = require("apisix.core") | ||
| local hostname = core.utils.gethostname() | ||
bzp2010 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ngx.say("hostname: ", hostname) | ||
| local hostname2 = core.utils.gethostname() | ||
| ngx.say("hostname cached: ", hostname == hostname2) | ||
| ngx.say("hostname valid: ", hostname ~= "" and (hostname ~= "unknown" or true)) | ||
|
||
| } | ||
| } | ||
| --- request | ||
| GET /t | ||
| --- response_body_like | ||
| hostname: .+ | ||
| hostname cached: true | ||
| hostname valid: true | ||
Uh oh!
There was an error while loading. Please reload this page.