Files
QSfera/deployments/examples/service_policies/policies/postprocessing.rego
T
Florian Schade fdaf39f5d1 fix: proxy policies middleware tus filename evaluation
when uploading files via uppy (tus), the path does not give any information about the file, PUT contains the filename in the path, tus POST not.

this pr extracts the HeaderUploadMetadata from that POST request and enhances the policies grpc environment request with that information.

Therefore, the policies service is now able to evaluate proxy requests for tus uploads too.
2023-04-18 20:26:52 +02:00

11 lines
203 B
Rego

package postprocessing
import future.keywords.if
import data.utils
default granted := true
granted = false if {
not utils.collection_contains(utils.ALLOWED_FILE_EXTENSIONS, input.resource.name)
}