birdofpreyru / react-native-static-server

Embedded HTTP server for React Native
https://dr.pogodin.studio/docs/react-native-static-server
Other
154 stars 22 forks source link

Allow custom content type / content encoding configurations #13

Closed gfaraj closed 1 year ago

gfaraj commented 1 year ago

Any thoughts on adding ability to configure file response headers? I'm trying to use this to serve WebGL games and some files are gzipped and require specific content types based on the underlying data type.

birdofpreyru commented 1 year ago

I think, it would be cool to have :)

The way I see it, I am working (#12) on migrating the internal implementation of native HTTP server to Lighttpd, once it is completed it will be possible to support very custom configurations and features of HTTP server, including custom response headers. It turned out to be quite an endeavour though. As of now, I mostly got PoC version working for Android, pending a bunch of testing, fixes, and polishing. I'm expecting to get iOS version completed by March 2023. Anybody willing to ensure it happens, or happens sooner, there is Support button available on the repo (for me this library is currently a hobby project, thus working on it might be delayed by searching and working on actually paying projects ;)

gfaraj commented 1 year ago

Thanks for the info! Appreciate it.

birdofpreyru commented 1 year ago

See extraConfig option added to Server constructor in v0.9.0.