Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for sending headers with previewing items #45

Open
n1crack opened this issue Feb 29, 2024 · 0 comments
Open

Add support for sending headers with previewing items #45

n1crack opened this issue Feb 29, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@n1crack
Copy link
Owner

n1crack commented Feb 29, 2024

Currently, the VueFinder file manager's preview feature lacks support for sending custom headers, such as Authorization headers containing JWT tokens, when fetching images or loading videos, previewing pdfs etc..

This limitation arises because the preview feature utilizes straightforward URLs in the tag to display images, which does not allow for the inclusion of headers in the requests.

We can disable the preview feature, if the Authentication header is set. And show only the public links if they are set. This is the easiest solution I think.

If we want to show previews of auth protected items, there are some discussions to look at first:

https://alphahydrae.com/2021/02/how-to-display-an-image-protected-by-header-based-authentication/

https://stackoverflow.com/questions/46642960/authorization-header-in-img-src-link

Btw, out of context, while talking about previews, when displaying folder with a large amount of images like more than 50 or 100, i'm thinking to disable the preview in grid view. It will increase performance.

@n1crack n1crack added the help wanted Extra attention is needed label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant