Closed thiagovito closed 3 years ago
@thiagovito You might want to use custom headers on your methods not needing the authorization header.
Every method is generated with an argument function to modify the headers
@jonathan-casarrubias Sorry if this is a stupid question. But I have tried implementing the custom headers. I could not find any documentation of how to use it.
Could you please show me an example of its implementation? I would appreciate it in advance, and apologies to take your time.
this.myServiceApi.myRemoteMethod(MyParam1, MyParam2, (headers) => {
// do something with headers (e.g. remove authentication)
return headers; // Return modified headers
})
What type of issue are you creating?
What version of this module are you using?
Write other if any:
Please add a description for your issue:
We have noticed that the SDK sends Authorization Header by default in every request when users are logged. Therefore, it adds an extra time on its execution.
So our point is: Is there a way to remove the authorization header to methods(endpoints) that do not require Authorization?