<div dir="ltr">Hi developers,<div><br></div><div>I am using OpenLayers 2.11 to display WMS Layers, but I need any help, because I am trying to pass authorization headers into a WMS request, but I don't know if it's possible.</div>
<div><br></div><div>The request that I sent is:</div><div><br></div><div><div>var layer = new OpenLayers.Layer.WMS(</div><div><span class="" style="white-space:pre"> </span>layerData.name,</div><div><span class="" style="white-space:pre">    </span>layer_url,</div>
<div><span class="" style="white-space:pre">    </span>{</div><div><span class="" style="white-space:pre">          l</span>ayers: layers</div><div><span class="" style="white-space:pre">     </span>},</div><div><span class="" style="white-space:pre"> </span>{</div>
<div><span class="" style="white-space:pre">    </span>    <span class="" style="white-space:pre">      </span><b>headers: {</b></div><div><b>                     'Authorization': 'Basic user:pass'</b></div><div><b><span class="" style="white-space:pre">    </span>    <span style="white-space:pre">    </span>}</b></div>
<div><span class="" style="white-space:pre">    </span>}</div><div>);</div></div><div><div><br></div><div>I know that the better options to do this is throught a proxy, but I need to do this temporaly.</div><div><br></div><div>
Regards!!!</div><div><br></div>-- <br><div style="color:rgb(136,136,136)">Moisés Arcos Santiago</div><div style="color:rgb(136,136,136)">Área de Proyectos</div><div style="color:rgb(136,136,136)"> </div><div style="color:rgb(136,136,136)">
Emergya Consultoría</div><div style="color:rgb(136,136,136)">Tfno: <a value="+34954517577" style="color:rgb(17,85,204)">+34 954 51 75 77</a></div><div style="color:rgb(136,136,136)">Fax: <a value="+34954516473" style="color:rgb(17,85,204)">+34 954 51 64 73</a></div>
<div style="color:rgb(136,136,136)"><a href="http://www.emergya.es/" style="color:rgb(17,85,204)" target="_blank">www.emergya.es</a></div>
</div></div>