Search code examples
angularjsangular-file-upload

How can I set authorization header in Angular filemanager


I am using angular-filemanager in my project.

Is it possible to set the authorization header? I use a bearer token and the server needs the following header: "Authorization" "Bearer [token]"

I want to use token to prevent open file manager before login(use file manger address)


Solution

  • I solved the problem.

    In apihandler.js file, I add this:

    $http.defaults.headers.common['Authorization'] = 'Bearer ' + token;