vendredi 31 mai 2019

EmberJS: overwriting ember-ajax error helper

I'm overwriting the isUnauthorizedError function of ember-ajax in order to invalidate the user's session, but only if the host of the request matches a specific host. However, I can't find a way to determine the host inside that function. Is there any way?

import AjaxService from 'ember-ajax/services/ajax';

export default AjaxService.extend({
   isUnauthorizedError(arg1, arg2, arg3) {
     // retrieve host
   }
});




Aucun commentaire:

Enregistrer un commentaire