-
Notifications
You must be signed in to change notification settings - Fork 336
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
Version 1.33 -> settings/http/server_version to false not working #1443
Comments
Hi,
Did you mean you can see the number in the response from the above |
Just double checked this is still working, it is. Note that by design you will still get a 'Server' header showing 'Unit' |
Thank you for your help. But then I don't know what my mistake is. I use nginx in front to handle static files, firewall and caching stuff. All php requests I proxy to unit. WordPress is running fine. I just have 2 problems:
Attached my full config: |
Ah, I think this may be a different issue as certainly with phpinfo, I don't think it gets the version from the 'Server' header, which is all that that option currently effects. |
Yeah, it's coming from (for php) 1432 php_register_variable_safe((char *) "SERVER_SOFTWARE",
1433 (char *) nxt_server.start,
1434 nxt_server.length, track_vars_array TSRMLS_CC); in
72 nxt_str_t nxt_server = nxt_string(NXT_SERVER);
15 #define NXT_SERVER NXT_NAME "/" NXT_VERSION |
This perhaps warrants an "per-application" setting that hides the version from applications themselves... |
@tobias992 Just to help me better understand the context, may I ask why you want to hide the |
@callahad I don't care about local development. But when the site is online, I think it's always a good practice to hide the server software version. I think if nginx unit has the server_version setting, it should work automatically for all applications. This is what I personally expect from such a setting. Because at the moment this setting makes no sense to me because it doesn't work for the full setup. |
Hi,
It's not possible to disable the server_version. The config is reloading fine but still i can see the version number. We use unit 1.33.
curl request:
curl -X PUT --data-binary 'false' --unix-socket /run/control.unit.sock http://localhost/config/settings/http/server_version { "success": "Reconfiguration done." }
My config file:
{ "settings": { "http": { "server_version": false } }, // Rest of my config }
The text was updated successfully, but these errors were encountered: