dimanche 18 décembre 2016

add headers authorization for token, token not showing on request header when i run my application in production

i try to add headers authorization for my application, it's working well when i try run my code on development env..

but i got error (unauthorized) when i try on production env.. when i inspect on chrome->network->headers, the token headers that i set not showing on there.. any one know how to fix it?

this is how i wrote the headers mycode.coffe :

$http.get("/api/#{type}?#{$.param(queryParams)}", ignoreLoadingIndicator: params.ignoreLoadingIndicator, headers: "X-API-TOKEN": "a681ff302f5b5b7fab18d6efe8b2541e375a565678c0b040")
      .then (response) ->
          data = response.data

i don't know why that X-API-TOKEN not showing when i run my application on production env.. but it's showing when i run on development env..

thank you very much..

this is prod env:

enter image description here

this is develop env:

enter image description here

Aucun commentaire:

Enregistrer un commentaire