I'm trying to establish a reverse proxy for tableau server through IIS. To explain it in short, clients will be accessing http://localhost/tableau which will in turn do a reverse proxy to http://tableau.abc.local:8000/
I am using URL rewrite modules in IIS server to enable this. But using the URL rewrite rule, I am not able to modify the URLs getting generated in the JavaScript function block of the HTML response. Has anyone used IIS to reverse proxy for Tableau server? If so, would be great if you can help me figure out the problem.
Below is the web.config file:
<?xml version="1.0" encoding="UTF-8"?><configuration><system.web><httpRuntime requestPathInvalidCharacters="<,>,%,&,\,?" /></system.web><system.webServer><rewrite><rules><rule name="Inbound1" stopProcessing="true"><match url="tableau/(.*)" /><conditions><add input="{HTTP_HOST}" pattern="^localhost?" /><add input="{URL}" pattern="tableau" /></conditions><action type="Rewrite" url="http://tableau.abc.local:8000/{R:1}" logRewrittenUrl="true" /></rule></rules><outboundRules><rule name="Outbound1" enabled="true"><match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script, CustomTags" customTags="Custom1" pattern="^/ (v_83001503081149|images|t|auth|thumb|views|t|vizql)/(.*)?" /><conditions><add input="{HTTP_HOST}" pattern="^tableau.abc.local:8000?" /></conditions><action type="Rewrite" value="http://localhost/tableau/{R:1}/{R:2}" /></rule><rule name="Rewrite image URLs in CSS response" preCondition="IsCSS"><match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script, CustomTags" customTags="Custom1" pattern="^ (v_83001503081149|images|t|auth|thumb|views|t|vizql)/(.*)?" /><action type="Rewrite" value="http://localhost/tableau/{R:1}/{R:2}" /></rule><rule name="Rewrite URLs in HTML response" preCondition="ResponseIsHtml1"><match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script, CustomTags" customTags="Custom1" pattern="^/ (v_83001503081149|images|t|auth|thumb|views|t|vizql)/(.*)?" /><action type="Rewrite" value="http://localhost/tableau/{R:1}/{R:2}" /></rule><rule name="Rewrite URLs in JavaScript response" preCondition="ResponseIsJS"><match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script, CustomTags" customTags="Custom1" pattern="^/ (v_83001503081149|images|t|auth|thumb|views|t|vizql|workbooks)/(.*)?" /><action type="Rewrite" value="http://localhost/tableau/{R:1}/{R:2}" /></rule><rule name="Encode URL" preCondition="ResponseIsHtml1"><match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script, CustomTags" customTags="Custom1" pattern="^&#x2f; (v_83001503081149|images|t|auth|thumb|views|t|vizql|workbooks)&#x2f;(.*)?" /><action type="Rewrite" value="http://localhost/tableau/{R:1}/{R:2}" /></rule><rule name="Encode rule 2" preCondition="ResponseIsJS"><match filterByTags="A, Area, Base, Form, Frame, Head, IFrame, Img, Input, Link, Script" pattern="^\x5Cx2Fv(v\x5Cx5F83001503081149|images|t|auth| thumb|views|t|vizql|workbooks)\x5Cx2F(.*)" /><action type="Rewrite" value="http://localhost/tableau/{R:1}/{R:2}" /></rule><preConditions><preCondition name="IsCSS"><add input="{RESPONSE_CONTENT_TYPE}" pattern="text/css" /></preCondition><preCondition name="ResponseIsHtml1"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="text/html" /> </preCondition><preCondition name="ResponseIsJS"> <add input="{RESPONSE_CONTENT_TYPE}" pattern="text/javascript" /> </preCondition></preConditions><customTags><tags name="Custom1"><tag name="table" attribute="tb" /></tags></customTags></outboundRules></rewrite><urlCompression doDynamicCompression="false" /></system.webServer></configuration>