RGW Lua - cancel request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Lately I’ve been playing with Lua scripting on top of RGW.

I would like to implement a request blocking based on bucket name -> when there is a dot in a bucket name return error code and a message that this name is invalid.

Here is the code I was able to came up with.

if string.find(Request.HTTP.URI, '%.') then
   Request.Response.HTTPStatusCode = 400
   Request.Response.HTTPStatus = “InvalidBucketName"
   Request.Response.Message = “Dots in bucket name are not allowed."
end

This works fine, but the request for creating a bucket would be processed and the bucket will be created. I thought about a dirty workaround with setting the Request.Bucket.Name to a bucket that already exists but it seems that this field is not writable in Quincy.

Is there a way to block the request from processing?

Any help is much appreciated.

Kind regards,

Ondrej
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux