mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 23:36:08 -06:00
commit
e9eb2147a5
@ -624,6 +624,10 @@ class AdvsController extends PublicController
|
||||
|
||||
$adv = $this->adv_repository->getListItemAdv($id);
|
||||
|
||||
if (!Auth::check() or ($adv['created_by_id'] != auth()->id() and !Auth::user()->isAdmin())) {
|
||||
abort(403);
|
||||
}
|
||||
|
||||
for ($i = 1; $i <= 10; $i++) {
|
||||
$cat = "cat" . $i;
|
||||
if ($adv->$cat != null) {
|
||||
|
||||
57
resources/streams/config/httpcache.php
Normal file
57
resources/streams/config/httpcache.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| HTTP CACHE ENABLED
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Do you want to enable HTTP caching?
|
||||
|
|
||||
*/
|
||||
|
||||
'enabled' => env('HTTP_CACHE', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| DEFAULT TTL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| What is the default TTL value (seconds)?
|
||||
|
|
||||
*/
|
||||
|
||||
'ttl' => env('HTTP_CACHE_TTL', 3600),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| EXCLUDED PATHS
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify cache-excluded paths.
|
||||
| Use * for partial matching.
|
||||
|
|
||||
*/
|
||||
|
||||
'excluded' => [
|
||||
'/advs/create_adv',
|
||||
'/advs/edit_advs/*',
|
||||
'/profile',
|
||||
'/profile/*',
|
||||
'/ajax/*',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| TIMEOUT RULES
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify timeout rules per path.
|
||||
| Use * for partial matching.
|
||||
|
|
||||
*/
|
||||
|
||||
'rules' => explode(',', env('HTTP_CACHE_RULES', '')),
|
||||
|
||||
];
|
||||
Loading…
Reference in New Issue
Block a user