Commit ec039719 authored by Joshua Tauberer's avatar Joshua Tauberer

prevent caching of ajax responses in the control panel

GET requests might be cached. Definitely happens on Internet Explorer. Makes it look like the user is getting unauthorized access.

See https://discourse.mailinabox.email/t/fresh-install-can-login-to-webmail-but-not-admin/394/4.
parent 14b16b2f
......@@ -329,6 +329,7 @@ function api(url, method, data, callback, callback_error) {
ajax({
url: "/admin" + url,
method: method,
cache: false,
data: data,
beforeSend: function(xhr) {
// We don't store user credentials in a cookie to avoid the hassle of CSRF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment