Restricting access to files with Roda and Rodauth #386
Closed
i-h8-github
started this conversation in
General
Replies: 2 comments
-
You should have a separate directory for files that require authentication, and then you can use the multi_public plugin to only serve those files after authentication: https://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/MultiPublic.html |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you, that was indeed very simple. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
What is the preferred approach to restricting access to (certain) files to a logged-in user? I can't seem to quite figure out how this should work with Roda and Rodauth. Given "public/file.pdf", my instinct was to try something like this:
but that skips the authentication requirement (tangentially, what use case was the :pass plugin designed for?).
Is there a preferred approach to this? Or am I just missing something obvious?
Beta Was this translation helpful? Give feedback.
All reactions