browserup / browserup-proxy

BrowserUp Proxy is a free utility to watch, test, and manipulate web application network traffic and performance.
https://browserup.com
Apache License 2.0
164 stars 41 forks source link

"rewrite" endpoint causes redirect to "replace+replace", not "replace" #283

Closed mtrea closed 4 years ago

mtrea commented 4 years ago

Hi,

I see "PUT /proxy/[port]/rewrite" documented in the README, but it's not having the anticipated effect. In short, if I send the payload: { "matchRegex": ".*", "replace": "http://example.com" }

it seems to substitute the replacement URL twice. Instead of going to "http://example.com" it attempts to go to "http://example.comhttp://example.com".

I recognize that this is a sparse bug report. Based on the history of RewriteUrlManager.java it looks like this feature may still be under development. If that's the case, I'm happy to hold my tongue. Else, I can provide more detailed reproduction steps, but this seems to happen for all of the valid configurations I've tried.