From 34605cce0d8a13ce3acff7a4bd4dc4a13754563c Mon Sep 17 00:00:00 2001 From: ecsecta <59734644+ecsecta@users.noreply.github.com> Date: Thu, 10 Sep 2020 09:54:53 +0200 Subject: [PATCH] Fix name of deprecated oc_requesttoken oc_requesttoken is marked as deprecated. --- developer_manual/basics/front-end/js.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer_manual/basics/front-end/js.rst b/developer_manual/basics/front-end/js.rst index 3f5bc71c4..794be5b04 100644 --- a/developer_manual/basics/front-end/js.rst +++ b/developer_manual/basics/front-end/js.rst @@ -34,14 +34,14 @@ listen to the ``OCA\Files::loadAdditionalScripts`` event: Sending the CSRF token ---------------------- -If any other JavaScript request library than jQuery is being used, the requests need to send the CSRF token as an HTTP header named **requesttoken**. The token is available in the global variable **oc_requesttoken**. +If any other JavaScript request library than jQuery is being used, the requests need to send the CSRF token as an HTTP header named **requesttoken**. The token is available in the global variable **OC.requestToken**. For AngularJS the following lines would need to be added: .. code-block:: js var app = angular.module('MyApp', []).config(['$httpProvider', function($httpProvider) { - $httpProvider.defaults.headers.common.requesttoken = oc_requesttoken; + $httpProvider.defaults.headers.common.requesttoken = OC.requestToken; }]);