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.
11 lines
203 B
Rego
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)
|
|
}
|