@@ -167,11 +167,11 @@ public function listFiles($bucket, $prefix = null, $marker = null, $limit = 1000
167
167
* 设置Referer防盗链
168
168
*
169
169
* @param $bucket 空间名
170
- * @param $mode 0: 表示关闭Referer(使用此选项将会忽略以下参数并将恢复默认值); 1: 表示设置Referer白名单; 2: 表示设置Referer
171
- * 黑名单
170
+ * @param $mode 0: 表示关闭Referer(使用此选项将会忽略以下参数并将恢复默认值); 1: 表示设置Referer白名单; 2:
171
+ * 表示设置Referer黑名单
172
172
* @param $norefer 0: 表示不允许空 Refer 访问; 1: 表示允许空 Refer 访问
173
- * @param $pattern 规则字符串, 当前允许格式分为三种: 一种为空主机头域名, 比如 foo.com; 一种是泛域名, 比如 *.bar.com; 一种
174
- * 是完全通配符 ,
173
+ * @param $pattern 规则字符串, 当前允许格式分为三种: 一种为空主机头域名, 比如 foo.com; 一种是泛域名,
174
+ * 比如 *.bar.com; 一种是完全通配符 ,
175
175
* 即一个 *; 多个规则之间用;隔开, 比如: foo.com;*.bar.com;sub.foo.com;*.sub.bar.com
176
176
* @param $source_enabled 源站是否支持,默认为0只给CDN配置, 设置为1表示开启源站防盗链
177
177
*
@@ -221,13 +221,19 @@ public function bucketLifecycleRule($bucket, $name, $prefix, $delete_after_days,
221
221
* @param $bucket 空间名
222
222
* @param $name 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
223
223
* @param $prefix 同一个 bucket 里面前缀不能重复
224
- * @param $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,大于0表示多少天后删除,需大于 to_line_after_days
225
- * @param $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不转低频存储,小于0表示上传的文件立即变低频存储
226
- *
224
+ * @param $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,大于0表示多少天后删除,
225
+ * 需大于 to_line_after_days
226
+ * @param $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不转低频存储,
227
+ * 小于0表示上传的文件立即变低频存储
227
228
* @return mixed 成功返回NULL,失败返回对象Qiniu\Http\Error
228
229
*/
229
- public function updateBucketLifecycleRule ($ bucket , $ name , $ prefix , $ delete_after_days , $ to_line_after_days )
230
- {
230
+ public function updateBucketLifecycleRule (
231
+ $ bucket ,
232
+ $ name ,
233
+ $ prefix ,
234
+ $ delete_after_days ,
235
+ $ to_line_after_days
236
+ ) {
231
237
$ path = '/rules/update ' ;
232
238
if ($ bucket ) {
233
239
$ params ['bucket ' ] = $ bucket ;
@@ -290,7 +296,8 @@ public function deleteBucketLifecycleRule($bucket, $name)
290
296
* @param $name 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
291
297
* @param $prefix 同一个 bucket 里面前缀不能重复
292
298
* @param $suffix 可选,文件配置的后缀
293
- * @param $event 事件类型,可以指定多个,包括 put,mkfile,delete,copy,move,append,disable,enable,deleteMarkerCreate
299
+ * @param $event 事件类型,可以指定多个,包括 put,mkfile,delete,copy,move,append,disable,
300
+ * enable,deleteMarkerCreate
294
301
* @param $callbackURL 通知URL,可以指定多个,失败依次重试
295
302
* @param $access_key 可选,设置的话会对通知请求用对应的ak、sk进行签名
296
303
* @param $host 可选,通知请求的host
@@ -344,7 +351,8 @@ public function putBucketEvent(
344
351
* @param $name 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
345
352
* @param $prefix 同一个 bucket 里面前缀不能重复
346
353
* @param $suffix 可选,文件配置的后缀
347
- * @param $event 事件类型,可以指定多个,包括 put,mkfile,delete,copy,move,append,disable,enable,deleteMarkerCreate
354
+ * @param $event 事件类型,可以指定多个,包括 put,mkfile,delete,copy,move,append,disable,
355
+ * enable,deleteMarkerCreate
348
356
* @param $callbackURL 通知URL,可以指定多个,失败依次重试
349
357
* @param $access_key 可选,设置的话会对通知请求用对应的ak、sk进行签名
350
358
* @param $host 可选,通知请求的host
@@ -435,10 +443,10 @@ public function deleteBucketEvent($bucket, $name)
435
443
* 规则:"http://abc.com" 请求:"https://abc.com"/"abc.com" 结果:不通过
436
444
* 规则:"abc.com" 请求:"http://abc.com" 结果:不通过
437
445
* allowed_method: 允许的方法。必填;不支持通配符;大小写不敏感;
438
- * allowed_header: 允许的header。选填;支持通配符*,但只能是单独的*,表示允许全部header,其他*不生效;空则不允许任何header;大小
439
- * 写不敏感 ;
440
- * exposed_header: 暴露的header。选填;不支持通配符;X-Log, X-Reqid是默认会暴露的两个header;其他的header如果没有设置,则不会
441
- * 暴露 ;大小写不敏感;
446
+ * allowed_header: 允许的header。选填;支持通配符*,但只能是单独的*,表示允许全部header,其他*不生效;
447
+ * 空则不允许任何header;大小写不敏感 ;
448
+ * exposed_header: 暴露的header。选填;不支持通配符;X-Log, X-Reqid是默认会暴露的两个header;
449
+ * 其他的header如果没有设置,则不会暴露 ;大小写不敏感;
442
450
* max_age: 结果可以缓存的时间。选填;空则不缓存;
443
451
* allowed_credentials:该配置不支持设置,默认为true。
444
452
* 备注:如果没有设置任何corsRules,那么默认允许所有的跨域请求
0 commit comments