Environments Management ( Dev Stack): Analyze and configure the server_name to only accept requests with the appropriate hostname
- Dominant language
- TypeScript
- Stars
- 29
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
**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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the nginx configuration used by the development stack and compare its current server blocks with the example in the issue. Analyze which hostnames should be accepted, then verify that unmatched hostnames are rejected and that the accepted-host configuration works as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100