Hide Forgot
Cloned from launchpad blueprint https://blueprints.launchpad.net/swift/+spec/x-auth-token-in-cookies. Description: For Javascript/HTML based application it is not possible to send HTTP header for downloading file locally via clicking on a link. TempURL middleware requires exposure of a secret key, which is not desirable for Javascript/HTML application since source code is entirely on the client. The proposed solution is to change tempauth to recognize "X-Auth-Token" cookie, which could be set by Javascript in the browser. Then it will be possible to download file from Swift by clicking a link. Here is a patch for tempauth.py: 132c132 < token = env.get('HTTP_X_AUTH_TOKEN', env.get('HTTP_X_STORAGE_TOKEN')) --- > token = env.get('HTTP_X_AUTH_TOKEN', env.get('HTTP_X_STORAGE_TOKEN', Request(env).cookies.get('X-Auth-Token'))) Specification URL (additional information): None