Hello,
The URI isn't available by default in server side events, so you'll have to check for it in the HTTP_REQUEST event. Can you give this a try?
when HTTP_REQUEST {
Don't rewrite the response by default
set rewrite_response 0
Check if we want to rewrite the response based on the requested URI
if {[string tolower [HTTP::path]] contains "/_wpresources"}{
set rewrite_response 1
}
}
when HTTP_RESPONSE {
Disable the stream filter by default
STREAM::disable
Check if we're rewriting the response
if {$rewrite_response==1}{
Match any http:// instance and replace it with https://
STREAM::expression {@http://@https://@}
Enable the stream filter for this response only
STREAM::enable
}
}
I didn't add logging, but you can do so following the examples on the STREAM::expression wiki page (
Click here).
Aaron