Skip to content

Commit

Permalink
Prevent config.ini access from web
Browse files Browse the repository at this point in the history
  • Loading branch information
diller110 committed Aug 26, 2019
1 parent 29d69c8 commit ef003fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/advert/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
$f3->route('POST /ex/ads','Ex->adsPost');
$f3->route('GET /ex/ads/@id/delete','Ex->adsDelete');


$f3->route('GET|POST /app', function($f3) {
$f3->reroute('@main');
});
$f3->route('GET|POST /app/*', function($f3) {
$f3->reroute('@main');
});
$f3->route('GET /css/@file', function($f3) {
header('Content-Type: text/css');
echo $f3->read($f3->get('UI').'css/'.$f3->get('PARAMS.file'));
Expand Down
7 changes: 7 additions & 0 deletions web/nginx config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
в server { ... }

#AC:Advert https://hlmod.ru/threads/ac-advert-reklamnye-soobschenija.49238/
location /advert {
index index.php index.html index.htm;
try_files $uri /advert/index.php?$query_string;
}

0 comments on commit ef003fd

Please sign in to comment.