nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.3k stars 325 forks source link

Esi/Ssi Support #838

Open DracoBlue opened 1 year ago

DracoBlue commented 1 year ago

Hello,

is it possible to activate or make ssi or esi support for nginx unit?

We are currently investigating if this is possible out of the box or needs a nginx or varnish infront of the nginx unit server.

tippexs commented 1 year ago

Hi @DracoBlue this is not a build in feature but we are just looking into ways of building it with NJS either on Unit with the next releases or NJS. Lets say we can use ESI on NGINX + NJS. Would that help?

DracoBlue commented 1 year ago

This sounds good!

DracoBlue commented 1 year ago

Just to get it right: it is already possible to use nginx+ssi natively - so ESI in NGINX is not beneficial:).

But unit with either SSI or ESI (eg by using NJS) would be awesome.

Is it possible to use njs to generate responses in nginx unit, yet? I only saw ways to generate redirects or status codes!

tippexs commented 1 year ago

No we do not have any SSI support on NGINX, yet. But NJS and a js_conent block should be all we need to do here. Need some testing but I will let you know the results.

Is it possible to use njs to generate responses in nginx unit, yet? I only saw ways to generate redirects or status codes!

We are working on a rich response object for NJS on UNIT. @hongzhidao is the main engineer behind this feature. Any questions are well addressed here.

DracoBlue commented 1 year ago

We are using the native ssi support in nginx itself: http://nginx.org/en/docs/http/ngx_http_ssi_module.html

Do you mean nginx unit? But I cannot find js_content support in nginx unit :(.

DracoBlue commented 1 year ago

We are working on a rich response object for NJS on UNIT. @hongzhidao is the main engineer behind this feature. Any questions are well addressed here.

This sounds very nice! I did an SSI implementation in lua for a big project. So if rich response is possible with NJS on UNIT I am happy to convert it to NJS :).

tippexs commented 1 year ago

Sorry yes - It was about Unit. Sorry for the confusion. I will keep you posted on the Response implemenation in NJS on Unit.