Skip to content

Commit 8401180

Browse files
feat: more effectively blocking site scanners
1 parent c54b15b commit 8401180

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

nginx/filesystem/etc/nginx/conf.d/nginx.conf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,21 @@ server {
4343
#charset koi8-r;
4444
#access_log /var/log/nginx/host.access.log main;
4545

46-
location / {
46+
location = / {
4747
root /usr/share/nginx/html;
4848
# First attempt to serve request as file, then
4949
# as directory, then redirect to index(angular) if no file found.
5050
try_files $uri $uri/ /index.html;
5151
}
5252

53+
location ~ ^/(background|user/auth|user/login(?:/desktop)?|vm-admin|twitch-bot(?:/config)?|imdb-search) {
54+
return 404;
55+
}
56+
57+
location / {
58+
return 404;
59+
}
60+
5361
location /api/v1 {
5462
proxy_pass http://${IP_ADDRESS}:8081;
5563
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

src/src/app/app.routes.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export const routes: Routes = [
1717
{path: 'user/auth', component: LoginComponent},
1818
{path: 'user/login', component: LoginLandingComponent},
1919
{path: 'user/login/desktop', component: LoginLandingDesktopComponent},
20-
{path: 'home', component: HomeComponent},
2120
{path: 'vm-admin', component: VmManagerComponent, canActivate: [authGuard]},
2221
{path: 'twitch-bot', component: TwitchBotIndexComponent},
2322
{path: 'twitch-bot/config', component: TwitchBotConfigComponent},

0 commit comments

Comments
 (0)