Add Headers to ArcGIS Services...

584
5
06-30-2017 09:28 AM
MarkLittell
New Contributor III

Am I able to tweak the ArcGIS publisher to add headers to the service replies?

We have multiple single install ArcGIS servers accessible from one HTML5 app.

I'd like to add a header to the service reply so I know which server it came from.

0 Kudos
5 Replies
RandallWilliams
Esri Regular Contributor

You can add the header at the web tier - assuming you're using multiple web adaptors?

0 Kudos
MarkLittell
New Contributor III

Actually, i am not using a web adapter at all.

I am getting the services directly from the ArcGIS server.

0 Kudos
MarkLittell
New Contributor III

Anyone have an idea on how to add a header on the actual ArcGIS Server? I am not using the ArcGIS Web adapter.

0 Kudos
PhilipMcNeilly
Esri Contributor

SOIs allow for post processing of responses.  I'm unsure of the ability to add a header to a response though or how APIs and clients would react to an additional header.

About extending services—Documentation | ArcGIS Enterprise 

It would likely be more simple to monitor Server logs from each machine as incoming requests will be written at debug level.

0 Kudos
JonathanQuinn
Esri Frequent Contributor

Where would you be monitoring the header information?  I'd say PMcNeilly-esristaff‌ suggestion is the easiest.  Set the logs to at least Info and you'll be able to see which machine responded to the request through whatever operation you're running, (exportMap, query, etc).  What are you using instead of the Web Adaptors?  I'm wondering if you can insert your own custom header once the request reaches your front-end, (Apache, F5, whatever), and then set it to whatever backend machine you're sending the request to.

0 Kudos