I have created a Proxy script on my server. This Proxy script is standing between client and geoserver. But Proxy requires Authorize header from user. Openlayers application will send requests to Proxy with Authorize header.
I am setting default headers
OpenLayers.Request.DEFAULT_CONFIG.headers= { Authorization: "BASIC" + "123456" };
But server request header does not contain Authorization header that I set.
var lines = new OpenLayers.Layer.WMS(
"My Lines",
"http://localhost:43561/geoserver/wms",
{ layers: "GIS:my_lines", transparent: true},
{ isBaseLayer: false, layerId: "paths", isFilterEnabled: true }
);
This is my wms layer.
How can I set header values of OpenLayers request?