When testing with Firefox (I tested with Chrome before) I noticed that I could not connect anymore after enabling authentication. When inspecting the data using Wireshark I saw that there was an extra null character in the realm-name when using variables, compared to a direct realm (or off) in the configuration file.
When testing with Firefox (I tested with Chrome before) I noticed that I could not connect anymore after enabling authentication. When inspecting the data using Wireshark I saw that there was an extra null character in the realm-name when using variables, compared to a direct realm (or off) in the configuration file.
Suggested fix: Add
size_t realm_len = strnlen((const char *)realm->data, realm->len);
in function ngx_http_auth_digest_send_challenge and use this instead of directly using realm->len.