Fix url rewrite issues

Closes https://github.com/TeamPiped/Piped/issues/598
This commit is contained in:
FireMaskterK 2021-11-04 17:45:33 +00:00
parent 3709c89b5e
commit 5feec94220
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD
1 changed files with 4 additions and 1 deletions

View File

@ -1136,7 +1136,10 @@ public class ResponseHelper {
String path = url.getPath(); String path = url.getPath();
path = path.replace("-rj", "-rw"); if (path.contains("=")) {
path = StringUtils.substringBefore(path, "=") + "="
+ StringUtils.substringAfter(path, "=").replace("-rj", "-rw");
}
return Constants.PROXY_PART + path + (hasQuery ? "?" + query + "&host=" : "?host=") return Constants.PROXY_PART + path + (hasQuery ? "?" + query + "&host=" : "?host=")
+ URLUtils.silentEncode(host); + URLUtils.silentEncode(host);