- Uncommented the delete proxy rule button
- Added redirection path escape in dpcore
This commit is contained in:
Toby Chui 2025-06-16 20:16:36 +08:00
parent eb07917c14
commit 0b6dbd49bb
3 changed files with 12 additions and 5 deletions

View File

@ -330,7 +330,10 @@ func (p *ReverseProxy) ProxyHTTP(rw http.ResponseWriter, req *http.Request, rrr
locationRewrite := res.Header.Get("Location")
originLocation := res.Header.Get("Location")
res.Header.Set("zr-origin-location", originLocation)
decodedOriginLocation, err := url.PathUnescape(originLocation)
if err == nil {
originLocation = decodedOriginLocation
}
if strings.HasPrefix(originLocation, "http://") || strings.HasPrefix(originLocation, "https://") {
//Full path
//Replace the forwarded target with expected Host

View File

@ -203,7 +203,7 @@
<th>Destination</th>
<th>Virtual Directory</th>
<th class="no-sort">Tags</th>
<th class="no-sort" style="width:50px; cursor: default !important;"></th>
<th class="no-sort" style="width:100px; cursor: default !important;"></th>
</tr>
</thead>
<tbody id="httpProxyList">
@ -588,7 +588,7 @@
</td> -->
<td class="center aligned ignoremw" editable="true" datatype="action" data-label="">
<button title="Edit Proxy Rule" class="ui circular small basic icon button editBtn inlineEditActionBtn" onclick='editEndpoint("${(subd.RootOrMatchingDomain).hexEncode()}")'><i class="ellipsis vertical icon"></i></button>
<!-- <button title="Remove Proxy Rule" class="ui circular mini red basic icon button inlineEditActionBtn" onclick='deleteEndpoint("${(subd.RootOrMatchingDomain).hexEncode()}")'><i class="trash icon"></i></button> -->
<button title="Remove Proxy Rule" class="ui circular mini red basic icon button inlineEditActionBtn" onclick='deleteEndpoint("${(subd.RootOrMatchingDomain).hexEncode()}")'><i class="trash icon"></i></button>
</td>
</tr>`);
});

View File

@ -343,7 +343,9 @@
}
$(editorSideWrapper).each(function(){
$(this)[0].contentWindow.setDarkTheme(false);
if ($(this)[0].contentWindow.setDarkTheme){
$(this)[0].contentWindow.setDarkTheme(false);
}
})
if ($("#pluginContextLoader").is(":visible")){
@ -356,7 +358,9 @@
$(".sideWrapper iframe")[0].contentWindow.setDarkTheme(true);
}
$(editorSideWrapper).each(function(){
$(this)[0].contentWindow.setDarkTheme(true);
if ($(this)[0].contentWindow.setDarkTheme){
$(this)[0].contentWindow.setDarkTheme(true);
}
})
if ($("#pluginContextLoader").is(":visible")){
$("#pluginContextLoader")[0].contentWindow.setDarkTheme(true);