@cappitolian/http-local-server-swifter 0.0.26 → 0.0.27
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.
|
@@ -219,6 +219,9 @@ public class HttpLocalServerSwifter {
|
|
|
219
219
|
response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE, OPTIONS");
|
|
220
220
|
response.addHeader("Access-Control-Allow-Headers", "Origin, Content-Type, Accept, Authorization, X-Requested-With");
|
|
221
221
|
response.addHeader("Access-Control-Max-Age", "3600");
|
|
222
|
+
// Prevents TCP connection reuse. NanoHTTPD does not handle keep-alive
|
|
223
|
+
// correctly under rapid sequential requests, causing ERR_INVALID_HTTP_RESPONSE.
|
|
224
|
+
response.addHeader("Connection", "close");
|
|
222
225
|
}
|
|
223
226
|
|
|
224
227
|
private Response createErrorResponse(String message, Response.Status status) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cappitolian/http-local-server-swifter",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "Runs a local HTTP server on your device, accessible over LAN. Supports connect, disconnect, GET, and POST methods with IP and port discovery.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|