IMAGE DISPLAY WITH LOGIN AUTHENTICATION

Asked 1 years ago, Updated 1 years ago, 40 views

If it is HTML, you can make a login decision by checking the session.
However, the part of the image is written in HTML after the login decision, so it cannot be separated by the login decision.Or it will appear as it is when accessed via direct link.

How should I sort the images after the login decision?
I'm looking into it on Google, but I can't find a good article.If you know, please let me know.

javascript html

2022-09-30 20:51

3 Answers

For image files and other static files that require authentication and access control, is the simplest way to get them all through the application?

Specifically, the URL of the content, such as the image to be retrieved, is passed to the application with the ID of the content, rather than the path to the file.


2022-09-30 20:51

I think there are many ideas, but I think it would be nice to send all the images that need to be authenticated by Ajax.


2022-09-30 20:51

If you read the tags and sentences, it looks like you are trying to authenticate on the client side, such as scripts on HTML.
Even though it's an image file, the communication is http/https.
If you have permission to set it up on the server side, you can log in and manage it through sessions.

Try using authentication functions such as Basic authentication on the server software (Apache, etc.).
Access restrictions on per directory, per file, or regular expressions, and
Depending on how you extend it, you can use a handler to configure your authentication program in a fairly detailed way.

If you want to restrict the display of individual files after granting access to the login decision,
Install basic authentication with account information divided into limits.
There are several ways for the application (CGI) to check session information including images and return file data.

The recommended method is to limit the entire destination directory with fast, low-load Basic authentication.


2022-09-30 20:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.