@b9g/platform 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/runtime.js +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b9g/platform",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "ServiceWorker-first universal deployment platform. Write ServiceWorker apps once, deploy anywhere (Node/Bun/Cloudflare). Registry-based multi-app orchestration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"serviceworker",
|
package/src/runtime.js
CHANGED
|
@@ -943,12 +943,16 @@ async function handleMessage(message) {
|
|
|
943
943
|
});
|
|
944
944
|
const response = await handleFetchEvent(request);
|
|
945
945
|
const body = await response.arrayBuffer();
|
|
946
|
+
const headers = Object.fromEntries(response.headers.entries());
|
|
947
|
+
if (!headers["Content-Type"] && !headers["content-type"]) {
|
|
948
|
+
headers["Content-Type"] = "text/plain; charset=utf-8";
|
|
949
|
+
}
|
|
946
950
|
const responseMsg = {
|
|
947
951
|
type: "response",
|
|
948
952
|
response: {
|
|
949
953
|
status: response.status,
|
|
950
954
|
statusText: response.statusText,
|
|
951
|
-
headers
|
|
955
|
+
headers,
|
|
952
956
|
body
|
|
953
957
|
},
|
|
954
958
|
requestID: reqMsg.requestID
|