How can I set authorization header in Angular filemanager

Issue

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;

Answered By – Morteza QorbanAlizade

Answer Checked By – Jay B. (AngularFixing Admin)

Leave a Reply

Your email address will not be published.