Browse Source

[fix] Load private files having non-ascii characters when using Nginx's X-Accel-Redirect system

version-14
Anand Doshi 9 years ago
parent
commit
e055ad221f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frappe/utils/response.py

+ 1
- 1
frappe/utils/response.py View File

@@ -136,7 +136,7 @@ def send_private_file(path):
if frappe.local.request.headers.get('X-Use-X-Accel-Redirect'):
path = '/protected/' + path
response = Response()
response.headers[b'X-Accel-Redirect'] = path
response.headers[b'X-Accel-Redirect'] = frappe.utils.encode(path)

else:
filepath = frappe.utils.get_site_path(path)


Loading…
Cancel
Save