You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my current solution a MapService sits behind a proxy api which checks for JWT token provided as an "Authorization" header with each request before forwarding it further to the MapService. I cannot use "token" field of the DynamicLayer here since it simply attaches the token to the url as a query string it doesn't help much.
Describe the proposed solution
I would like to have an ability to either provide "extra" fetch headers to the DynamicLayer or initialize and provide the fetch client which the DynamicLayer can use to make API calls.
The text was updated successfully, but these errors were encountered:
The idea of an interceptor came to my mind from other experience with the ArcGIS API for JavaScript and I believe several other 3rd-party request JS libraries also have such a concept. However, here you'd have to try to experiment and write it by hand, such as in the very first link above #1303 (comment). This was a blog post I found after some quick searching honestly. You may need to try it out globally in your code and see if you can intercept requests to your dynamic map server and add your own logic to apply custom headers.
Describe the problem
In my current solution a MapService sits behind a proxy api which checks for JWT token provided as an "Authorization" header with each request before forwarding it further to the MapService. I cannot use "token" field of the DynamicLayer here since it simply attaches the token to the url as a query string it doesn't help much.
Describe the proposed solution
I would like to have an ability to either provide "extra" fetch headers to the DynamicLayer or initialize and provide the fetch client which the DynamicLayer can use to make API calls.
The text was updated successfully, but these errors were encountered: