TarheelGrad1998 / gallery-card

A custom card for Home Assistant that will display images and/or videos from a folder in the style of a gallery.
97 stars 30 forks source link

Request faild with Cloudflare and http configuration #62

Open S1M8N opened 1 year ago

S1M8N commented 1 year ago

Hello,

I have Gallery Card with NAS mount on my default view on HA and I have this error message every reboot HA instance.

Login attempt or request with invalid authentication from 192.168.1.122 (192.168.1.122). Requested URL: '/media/album/Photos/HA/****/Dsc00014.jpg?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3mFmYTdmlhdCI6MTY4DlOThmODk2ZDRmOWRiMzQ3YyIsInBhdGgiOiIvWVkaWoveAbIN8oW0vUGhvdG9zL0hBL1NpbW9uL0RzYzAwMDE0LmMiOiIwM2ZlMwZyIsInBhcmFtcyI6W10sIg3Nzc3MSwiZXhwIjxNjgwOTY0MTcxfQ.bt4luxmGneN7E31Vi1eHWVEo3hV6a08'. (Mozilla/5.0 (Linux; Android 6.0.1; APPC-12DSKP) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.210 Safari/537.36)

It's a problem for me because I have a lot login attempt invalid and all my device get banned.

If you have any idea 🙂

Thank you so much in advance

TarheelGrad1998 commented 1 year ago

Hrm, my guess is that the authentication for the media that the card receives on load is no longer good after the reboot of HA.

Maybe the card needs to detect the reboot and reload, something like that. I'll look into it.

Anrolosia commented 10 months ago

Hey @TarheelGrad1998 I do have the same issue, but I don't think it's because of the reboot. Correct me if I'm wrong but it seems you're putting in cache ALL pictures from the connected folder (at least I see a lot of calls in my network tab) and I think Cloudflare think it might be an attack or something like that... Do you think you can add an option to DON'T preload pictures and just pick one randomly? I played a bit with https://github.com/j-a-n/lovelace-wallpanel to see if they have the same issue, they don't, but sadly, there is no card. Feel free to let me know if I can help on that!

S1M8N commented 5 months ago

I still have this problem and no solution. If anyone can help me :)