瀏覽代碼

Prevent some browsers from caching servers basic auth request

louis 2 年之前
父節點
當前提交
cf5718bf4d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      httpd.c

+ 1 - 0
httpd.c

@@ -388,6 +388,7 @@ void httpd_connection(FILE *f)
                                 body, xs_dict_get(srv_config, "host"));
                                 body, xs_dict_get(srv_config, "host"));
 
 
         headers = xs_dict_append(headers, "WWW-Authenticate", www_auth);
         headers = xs_dict_append(headers, "WWW-Authenticate", www_auth);
+        headers = xs_dict_append(headers, "Cache-Control", "no-cache, must-revalidate, max-age=0");
     }
     }
 
 
     if (ctype == NULL)
     if (ctype == NULL)