sipi
sipi copied to clipboard
Skip authentication in pre_flight for /info.json
For Knora, I would like to be able to skip the whole authentication/authorization roundtrip for info.json requests.
@benjamingeer @tobiasschweizer Would this be ok? I understand that we need to limit access to images, but are there any reasons against allowing free access to info.json?
@lrosenth How hard would it be to provide the pre_flight script with the type of request? For now, we have default and info, but you mentioned that there is going to be a third one.
you could certainly do that in the lua function pre_flight.
that's what I thought, but I only have the identifier available, e.g., HIVkUWwH9rm-GMITRopjdpC.jpg. That's why the second question for @lrosenth regarding the request type.
I looked at the code: The preflight_script gets only 3 parameters:
- the prefix
- the identifier (which is the filename under which SIPI stores the image)
- the cookie(s) if available There is at the moment no way to determine which type of request. Bu I think it will make sense to transfer more information about the request to the preflight script. However doing so could break compatibility of existing pre_flight_scripts...
If You want to add more information to the preflight_script please make an issue and assign it to me!