JioTV-Go / jiotv_go

Unlock the magic of JioTV across all your devices, without the need for the JioTV App. Crafted with love in Golang for a delightful blend of speed and efficiency! 🌟✨
https://jiotv_go.rabil.me/
Other
377 stars 98 forks source link

fix for lg webos tv #371

Closed dheerajv4855 closed 2 months ago

dheerajv4855 commented 3 months ago

added flag based response change for webos so that it wont affect the other functionality we cab use --webos flag to serve for lg tv

rabilrbl commented 3 months ago

Explain your PR. Why u disabling helmet and a ETAG middleware? And what does c.Locals("webosMode", webosMode) do?

dheerajv4855 commented 3 months ago

helmet and ETAG middleware's are modifiying the response Header which is causing the issue to properly work on webos, Response header must contain Transfer-Encoding: "chunked" which is not happening even if we send as stream of data but if i disable those two middleware's it is working i am aware that helmet provides extra security to api but what if it is not allowing api to work on webos and those two middleware's will be excluded only in case of webos flag

c.Locals("webosMode", webosMode) is only to pass the flag value webosMode to fiber context so that we can retrieve that flag value anywhere in fiber handler which i am doing in handler.ChannelsHandler function i hope it is clear now JFYI this change is also working on android devices. i mean if we pass flag --webos and stream in android tv there also it works

rabilrbl commented 3 months ago

It's better if we disable it for all devices, better if we remove it completely as I have seen it causing issues.

So remove all flags and simply delete those middleware calls

rabilrbl commented 2 months ago

@dheerajv4855 Will u modify this PR or close it?

dheerajv4855 commented 2 months ago

hi @rabilrbl , will modify this PR to remove those middleware will update today or tomorrow

dheerajv4855 commented 2 months ago

hi @rabilrbl updated the PR by removing etag, helmet