This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

File privacy and access

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #56851
    james_mZ1Djames_mZ1D
    Participant

    My client has a large amount of historic magazine and newsletter pdfs that are searchable on the site for logged in users. The issue is that the content of the pdfs seems to be appearing on Google search results. This may be down to a search plugin that they are using (but is required).

    As such, we’re trying to find a way to limit the viewing of the pdfs by logged in users only. its been recommended that we disable public access on Azure and then write a proxy endpoint to allow access to in WordPress, but I wanted to check with you to see if you had any previous methods that work and, if not, will your plugin work with a proxy endpoint?

    Any thoughts or ideas most welcomed.

    Kind regards
    James Stone (developer for Laguna Club)
    Return email address: [email protected]

    #56859
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi James,

    I have no previous experience with this, but I would suggest doing something similar.

    Instead of going directly to the server, you can likely do it via a .htaccess rule in the file root directory. A very similar solution is described in this article.

    The solution is basically:
    – The user has the link to the file, tries to open it
    – Server recieves the request, checks the .htaccess for access rule
    – If it matches, then checks for the login cookie, if it exists, then allows file access.

    While this is not the most secure way, as the cookie can be created manually – but a generic visitor would not be able to figure that out. If you need a more robust solution, then this should be fine tuned further. Ex.: instead of checking a cookie, a request is made to a script that checks if the user is actually logged in via wordpress etc..

    These are only my 2 cents 🙂 I would definitely go with the linked solution, it is likely the simplest to implement. It is out of the scope of the plugin though.

    #56869
    james_mZ1Djames_mZ1D
    Participant

    Hi Ernest,

    Many thanks for your quick response and thoughts.

    That sounds like a good, simple plan. We’ll give it a go.

    Many thanks again.
    James

    #56870
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.