File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -28,18 +28,30 @@ public static function getResourceKey(): string
2828
2929 public static function getPrivateKey (): string
3030 {
31- return throw_unless (
31+ $ key = throw_unless (
3232 config ('cloudfront-cookies.private_key ' ),
3333 Exception::class
3434 );
35+
36+ if (file_exists ($ key ) && is_readable ($ key )) {
37+ return file_get_contents ($ key );
38+ }
39+
40+ return $ key ;
3541 }
3642
3743 public static function getKeyPairId (): string
3844 {
39- return throw_unless (
45+ $ key = throw_unless (
4046 config ('cloudfront-cookies.key_pair_id ' ),
4147 Exception::class
4248 );
49+
50+ if (file_exists ($ key ) && is_readable ($ key )) {
51+ return file_get_contents ($ key );
52+ }
53+
54+ return $ key ;
4355 }
4456
4557 public static function getExpires ()
You can’t perform that action at this time.
0 commit comments