| xqd
@@ -6,13 +6,18 @@ class HttpToHttps implements CastsAttributes
|
|
|
{
|
|
|
public function get($model, string $key, $value, array $attributes)
|
|
|
{
|
|
|
- return $value = str_replace('http://','https://',$value);
|
|
|
+ // 使用内网上传需要转换
|
|
|
+ $value = str_replace('http://','https://',$value);
|
|
|
+ $value = str_replace('-internal','',$value);
|
|
|
+ return $value;
|
|
|
}
|
|
|
|
|
|
|
|
|
public function set($model, string $key, $value, array $attributes)
|
|
|
{
|
|
|
-
|
|
|
- return $value = str_replace('http://','https://',$value);
|
|
|
+ // 使用内网上传需要转换
|
|
|
+ $value = str_replace('http://','https://',$value);
|
|
|
+ $value = str_replace('-internal','',$value);
|
|
|
+ return $value;
|
|
|
}
|
|
|
}
|