Comments (2)
Looks like the options
argument was added in Node.js v9.6.0 (2018-02-22) / v8.12.0 (2018-09-11) in nodejs/node#15752 and we missed it when implementing our shim for http.createServer
.
We should fix this in Unit, but the patch-package workaround should be fine for your use case until we can get a release out with a proper fix.
from unit.
I could create a fix by using patch-package
with the following steps:
- Install
unit-http
andpatch-package
as npm dependencies:npm i unit-http patch-package --save
- Add
"postinstall": "patch-package"
under"scripts"
insidepackage.json
- Edit the
http.js
file insidenode_modules/unit-http
by addingoptions
as the first argument to thecreateServer
function:function createServer (options, requestHandler) { return new Server(requestHandler); }
- Apply the patch:
npx patch-package unit-http
As a current workaround this is ok. Although I think this might not be a sustainable approach. The options
could be ignored in the case of our strapi deployment.
from unit.
Related Issues (20)
- unit-http req.httpVersion is incorrect HOT 2
- Chunked: unit-http response Transfer-Encoding being duplicated HOT 2
- How to deubg/log when writing njs scripts and so on? HOT 17
- WASM: Support for Wasi 0.2.0 on wasmtime17 HOT 10
- truncated response when serving big files HOT 15
- Running FastAPI app and getting a Starlette error HOT 8
- Python: Feature request: uvloop support for Python ASGI apps HOT 15
- Feature request: Support application-factory pattern for Python apps HOT 2
- Can't write cache permission denied! HOT 2
- NGINX AlmaLinux permission issues HOT 1
- Incorrect parsing of 64-bit integers HOT 29
- Proxy Grafana Live WebSocket connections
- Add support for writting application logs into stderr when Unit running inside of Docker HOT 5
- Segfault when sending data through nxt_unit_response_write() HOT 13
- test_access_log_keepalive - AssertionError: descriptors leak router HOT 7
- Nginx proxy_pass leading to unit, sometimes outputs 504 HOT 2
- Using Nginx Unit with a ReadOnly filesystem. HOT 5
- Getting strange message when trying to get static files HOT 4
- Add PHP 8.3 image HOT 1
- Does nginx-unit want to support WSGI+ ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unit.