-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R medvedev/hw5 #585
base: RMedvedev/main
Are you sure you want to change the base?
R medvedev/hw5 #585
Conversation
code/index.php
Outdated
@@ -0,0 +1,31 @@ | |||
<?php | |||
declare(strict_types = 1); | |||
header('Content-Type: application/json; charset=utf-8'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше использовать шаблон фронт контроллер и сделать index.php максимально простым:
$app = new App();
echo $app->run();
docker-compose.yaml
Outdated
ports: | ||
- "80:80" | ||
volumes: | ||
- ./code/:/var/www/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
У Вас вся папка с кодом доступна nginx и соответственно все файлы могу запросить напрямую через браузер, например тот же .env и получить все пароли. Это крайне плохо. Сделайте папку public, положите туда только index.php и используйте эту папку как корень в nginx.
No description provided.