Skip to content

Commit

Permalink
fix server function proxy passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Jul 9, 2024
1 parent 8337d88 commit c966159
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-geese-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@solidjs/start": patch
---

fix server function proxy passthrough
1 change: 1 addition & 0 deletions packages/start/src/runtime/server-fns-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function createServerReference(fn: Function, id: string, name: string) {
return `${baseURL}/_server?id=${encodeURIComponent(id)}&name=${encodeURIComponent(name)}`;
}
if (prop === "GET") return receiver;
return (target as any)[prop];
},
apply(target, thisArg, args) {
const ogEvt = getRequestEvent();
Expand Down
1 change: 1 addition & 0 deletions packages/start/src/runtime/server-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ export function createServerReference(fn: Function, id: string, name: string) {
return fn;
};
}
return (target as any)[prop];
},
apply(target, thisArg, args) {
return fetchServerFunction(`${baseURL}/_server`, `${id}#${name}`, {}, args);
Expand Down

0 comments on commit c966159

Please sign in to comment.