File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,9 +8,12 @@ export class BaseAPI {
88
99 constructor ( ) {
1010 this . http = axios . create ( {
11- xsrfCookieName : "csrftoken" ,
12- xsrfHeaderName : "X-CSRFToken" ,
13- // baseURL gets set in PulpAPI
11+ // API_BASE_PATH gets set in pulp.ts.
12+ xsrfCookieName : 'csrftoken' ,
13+ xsrfHeaderName : 'X-CSRFToken' ,
14+ // This is what prevents Pulp from sending the "WWW-Authenticat: Basic *" header.
15+ // In turn, firefox will not be asking for a password.
16+ headers : { 'X-Requested-With' : 'XMLHttpRequest' } ,
1417 paramsSerializer : {
1518 serialize : ( params ) => ParamHelper . getQueryString ( params ) ,
1619 } ,
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export class PulpAPI extends BaseAPI {
99 super ( ) ;
1010
1111 this . http . interceptors . request . use ( ( request ) => {
12+ // This is kind of delayed, because the settings promise may be evaluated later.
13+ // In search for a better solution.
1214 request . baseURL = config . API_BASE_PATH ;
1315
1416 return request ;
You can’t perform that action at this time.
0 commit comments