Skip to content

Conversation

olegfedoseev
Copy link

I added an ability to set server_name and script_name from variables (e.g.: $sent_http_x_pinba_server, header sent from PHP).
Now, before $pinba_request_uri it looks at pinba_script_name, and only if it's empty or failed to parse, it will use variable as fallback.
And, now we can customize server_name as well (why can't we do that earlier?:)) with similar logic - first, it looks at pinba_server_name, and if it failed or empty, then it fallback to default.

P.S. It was like third time when i wrote C, so maybe i implemented it not the way it should be, but it works :)

@olegfedoseev olegfedoseev force-pushed the customizable-server-and-script-name branch from 87283be to 22404db Compare August 18, 2015 04:40
@olegfedoseev
Copy link
Author

Example usage:

fastcgi_hide_header X-Pinba-Server;
fastcgi_hide_header X-Pinba-Script;

pinba_server_name $upstream_http_x_pinba_server;
pinba_script_name $upstream_http_x_pinba_script;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants