#define RGW_CORS_HEAD 0x4
#define RGW_CORS_POST 0x8
#define RGW_CORS_DELETE 0x10
-#define RGW_CORS_ALL (RGW_CORS_GET | \
- RGW_CORS_PUT | \
- RGW_CORS_HEAD | \
- RGW_CORS_POST | \
- RGW_CORS_DELETE)
+#define RGW_CORS_COPY 0x20
+#define RGW_CORS_ALL (RGW_CORS_GET | \
+ RGW_CORS_PUT | \
+ RGW_CORS_HEAD | \
+ RGW_CORS_POST | \
+ RGW_CORS_DELETE | \
+ RGW_CORS_COPY)
#define CORS_MAX_AGE_INVALID ((uint32_t)-1)
f.dump_string("AllowedMethod", "HEAD");
if (allowed_methods & RGW_CORS_POST)
f.dump_string("AllowedMethod", "POST");
+ if (allowed_methods & RGW_CORS_COPY)
+ f.dump_string("AllowedMethod", "COPY");
/*AllowedOrigins*/
for(set<string>::iterator it = allowed_origins.begin();
it != allowed_origins.end();
allowed_methods |= RGW_CORS_HEAD;
} else if (strcasecmp(s, "PUT") == 0) {
allowed_methods |= RGW_CORS_PUT;
+ } else if (strcasecmp(s, "COPY") == 0) {
+ allowed_methods |= RGW_CORS_COPY;
} else {
return false;
}