@whatwg-node/server 0.10.0-alpha-20241125130302-670fd9851060fb8e736194f703f4026f9566bf40 → 0.10.0-alpha-20241125130609-2d42652904068bfd5c22714b7277b8c77917aeba
Sign up to get free protection for your applications and to get access to all the features.
@@ -75,12 +75,13 @@ function createServerAdapter(serverAdapterBaseObject, options) {
|
|
75
75
|
if (onRequestHooks.length === 0) {
|
76
76
|
return handleEarlyResponse();
|
77
77
|
}
|
78
|
-
let url =
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
78
|
+
let url = request['parsedUrl'] ||
|
79
|
+
new Proxy(EMPTY_OBJECT, {
|
80
|
+
get(_target, prop, _receiver) {
|
81
|
+
url = new fetchAPI.URL(request.url, 'http://localhost');
|
82
|
+
return Reflect.get(url, prop, url);
|
83
|
+
},
|
84
|
+
});
|
84
85
|
const onRequestHooksIteration$ = (0, utils_js_1.iterateAsyncVoid)(onRequestHooks, (onRequestHook, stopEarly) => onRequestHook({
|
85
86
|
request,
|
86
87
|
setRequest(newRequest) {
|
@@ -71,12 +71,13 @@ function createServerAdapter(serverAdapterBaseObject, options) {
|
|
71
71
|
if (onRequestHooks.length === 0) {
|
72
72
|
return handleEarlyResponse();
|
73
73
|
}
|
74
|
-
let url =
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
74
|
+
let url = request['parsedUrl'] ||
|
75
|
+
new Proxy(EMPTY_OBJECT, {
|
76
|
+
get(_target, prop, _receiver) {
|
77
|
+
url = new fetchAPI.URL(request.url, 'http://localhost');
|
78
|
+
return Reflect.get(url, prop, url);
|
79
|
+
},
|
80
|
+
});
|
80
81
|
const onRequestHooksIteration$ = iterateAsyncVoid(onRequestHooks, (onRequestHook, stopEarly) => onRequestHook({
|
81
82
|
request,
|
82
83
|
setRequest(newRequest) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@whatwg-node/server",
|
3
|
-
"version": "0.10.0-alpha-
|
3
|
+
"version": "0.10.0-alpha-20241125130609-2d42652904068bfd5c22714b7277b8c77917aeba",
|
4
4
|
"description": "Fetch API compliant HTTP Server adapter",
|
5
5
|
"sideEffects": false,
|
6
6
|
"dependencies": {
|