Fix passing URL parameters when proxying (#1168)
parent
2020e85a6f
commit
6e421ca20e
|
@ -695,7 +695,11 @@ export class HttpServer {
|
||||||
if (this.spaceServer.readOnly) {
|
if (this.spaceServer.readOnly) {
|
||||||
return c.text("Read only mode, no federation proxy allowed", 405);
|
return c.text("Read only mode, no federation proxy allowed", 405);
|
||||||
}
|
}
|
||||||
let url = req.param("uri")!.slice(1);
|
|
||||||
|
// Get the full URL including query parameters
|
||||||
|
const originalUrl = new URL(req.url);
|
||||||
|
let url = req.param("uri")!.slice(1) + originalUrl.search;
|
||||||
|
|
||||||
if (!req.header("X-Proxy-Request")) {
|
if (!req.header("X-Proxy-Request")) {
|
||||||
// Direct browser request, not explicity fetch proxy request
|
// Direct browser request, not explicity fetch proxy request
|
||||||
if (!looksLikePathWithExtension(url)) {
|
if (!looksLikePathWithExtension(url)) {
|
||||||
|
|
Loading…
Reference in New Issue