only assign Authorization when session exists
This commit is contained in:
parent
8a00e9c0cd
commit
23ea5046bb
|
@ -141,8 +141,10 @@
|
||||||
|
|
||||||
function lintAndRequest(preq) {
|
function lintAndRequest(preq) {
|
||||||
function goGetHer() {
|
function goGetHer() {
|
||||||
|
if (preq.session) {
|
||||||
preq.headers = preq.headers || {};
|
preq.headers = preq.headers || {};
|
||||||
preq.headers.Authorization = 'Bearer ' + (preq.session.access_token || preq.session.accessToken);
|
preq.headers.Authorization = 'Bearer ' + (preq.session.access_token || preq.session.accessToken);
|
||||||
|
}
|
||||||
|
|
||||||
if (!oauth3._lintRequest) {
|
if (!oauth3._lintRequest) {
|
||||||
return rawRequest(preq);
|
return rawRequest(preq);
|
||||||
|
|
Loading…
Reference in New Issue