valenok/mongoose — pull request #122 by lego12239 (2013-03-05 12:32:43+00:00)
Title: Added server_name option.

Without this option, SERVER_NAME env var is set from Host http header.
If SERVER_NAME must be a constant string, set server_name option to
a needed name.

jmucchiello comment:

I agree this should have nothing to do with the authentication domain. But I'm wondering if a better way to go would be to have a "SERVER_NAME" option instead of the switch in this patch. If you want them to match, supply both. If you don't want them to match, supply them separately. If you want to use the incoming server header, don't set the SERVER_NAME option.

Then the coding change in the CGI section becomes:
if (option is set) SERVER=option value; else SERVER = client header;