fix cache control of json profile
This commit is contained in:
parent
e3af929579
commit
ee4cbd2092
|
|
@ -41,7 +41,10 @@ class ResponseMacroServiceProvider extends ServiceProvider
|
||||||
});
|
});
|
||||||
|
|
||||||
Response::macro('rawJson', function ($src = "", $status = 200, $header = []) {
|
Response::macro('rawJson', function ($src = "", $status = 200, $header = []) {
|
||||||
return Response::make($src)->header('Content-type', 'application/json');
|
return Response::make($src, $status, array_merge([
|
||||||
|
'Content-type' => 'application/json',
|
||||||
|
'Cache-Control' => 'public, max-age='.option('cache_expire_time') // 365 days
|
||||||
|
], $header));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user