I'd like to show cyrillic message in a browser's "HTTP Basic Authentication" prompt, but end up with abracadabra.
Here's my NGINX config:
server {
charset utf-8;
listen 80;
server_name example.com;
root /path;
include snippets/wordpress.conf;
auth_basic "Введите пароль.";
auth_basic_user_file /etc/nginx/.htpasswd;
}
here's curl output, that looks pretty, with utf-8 as content-type charset:
$ curl -I http://example.com/
HTTP/1.1 401 Unauthorized
Date: Sat, 12 Dec 2015 08:37:41 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie: __cfduid=x; expires=Sun, 11-Dec-16 08:37:41 GMT; path=/; domain=.mydomain.com; HttpOnly
WWW-Authenticate: Basic realm="Введите пароль."
Server: cloudflare-nginx
CF-RAY: xxxxxxxxxxxx-ARN
but here's the output of Chrome, Safari, Opera, Yandex browser... every browser I was able to try:
To view this page, you must log in to this area on example.com:80: ÐведиÑе паÑолÑ.