SIMS
SIMS copied to clipboard
Environments Management ( Dev Stack): Analyze and configure the server_name to only accept requests with the appropriate hostname
Describe the task Currently nginx is not configured to use any server_name which means that it accepts any request disregarding the hostname it was requested. More analysis is needed to check the importance of that and configure it appropriately. For that it's needed to set a "catch-all" server configuration and block it: https://serverfault.com/a/946623 E.g.:
server {
listen ${PORT} default_server;
server_name _;
# Configuration for the default server block
return 404;
}
server {
listen ${PORT};
server_name dev.hostname-example.com hostname-example.com;
location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}
}
Acceptance Criteria
- [ ] Analisys
- [ ] Change in configuration