Forum Discussion

logan92's avatar
Icon for Altocumulus rankAltocumulus
Dec 18, 2023

Stream Profile is not working with javascript var?

Hi, i want to solve mixed content issue but stream profile is not working with this javascript code , i want to change http:\u002f\u002 to https:// so i created an irule that matches @@http\u002f\u002f@https://@ , but when i saw response on webpage (view page source) , the url is still the same as http\u002f\u002f


<script type="text/javascript">
var _fV4UI=true;var _spPageContextInfo = {webServerRelativeUrl: "\u002f", webAbsoluteUrl: "http:\u002f\", siteAbsoluteUrl: "http:\u002f\", serverRequestPath: "\u002f_layouts\u002f15\u002fFormServer.aspx", layoutsUrl: "_layouts\u002f15", webTitle: "My Process", webTemplate: "1", tenantAppVersion: "0", isAppWeb: false, Has2019Era: true, webLogoUrl: "\u002fPortalImages\u002fLogo-W.jpg", webLanguage: 1033, currentLanguage: 1033, currentUICultureName: "en-US", currentCultureName: "en-GB", clientServerTimeDelta: new Date("2023-12-14T11:41:57.2492077Z") - new Date(), updateFormDigestPageLoaded: new Date("2023-12-14T11:41:57.2492077Z"), siteClientTag: "9$$16.0.5173.1000", crossDomainPhotosEnabled:false, webUIVersion:15, webPermMasks:{High:176,Low:138612807}, pagePersonalizationScope:1,userId:401,userLoginName:"", systemUserKey:"S-1-5-21-842925246-606747145-682003330-8418", alertsEnabled:true, siteServerRelativeUrl: "\u002f", allowSilverlightPrompt:'True', isSiteAdmin: false};Flighting.ExpFeatures = [480215056,1880287568,1561350208,302071836,3212816,69472768,4194310,-2113396707,268502022,-872284160,1049232,-2147421952,65536,65536,2097472,917504,-2147474174,1372324107,67108882,0,0,-2147483648,2097152,0,0,32768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32768];//]]>







# Disable the stream filter for all requests
# Check if response type is text, javascript, svg, or other images
# if {[HTTP::header value Content-Type] contains "text" || [HTTP::header value Content-Type] contains "text/javascript" || [HTTP::header value Content-Type] contains "svg" || [HTTP::header value Content-Type] contains "jpeg" || [HTTP::header value Content-Type] contains "png" || [HTTP::header value Content-Type] contains "gif"} {
# Replace http:// with https://
STREAM::expression {@http://@https://@ , @http%3a%2f%2f@https://@ , @http\u002f\u002f@https://@}
# Enable the stream filter for this response only
# }



How can i solve the stream profile issue? 
Is CSP header can help with mixed content issue when it inserted by F5 in reponse to the client or should i change content for any http to https by using stream profile?
do i need custom HTTP  rewrite profile profile to rewrite redirects from http to https? 


3 Replies