From 7ce47b7c72bf603bef6d0c74c6876110efca6d80 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Sun, 2 Jun 2019 21:14:39 -0700 Subject: [PATCH] Fix faq and downloads routing --- cmd/nginx/podsync.conf | 6 +++++- ui/src/app/app-routing.module.ts | 2 +- ui/src/app/index/index.component.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/nginx/podsync.conf b/cmd/nginx/podsync.conf index b547f4c..97515fa 100644 --- a/cmd/nginx/podsync.conf +++ b/cmd/nginx/podsync.conf @@ -39,7 +39,7 @@ http { # Cache media: images, icons, video, audio, HTC # See https://serversforhackers.com/c/nginx-caching - location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { + location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|ogg|ogv|webm|htc)$ { expires 3M; access_log off; add_header Cache-Control "public"; @@ -78,6 +78,10 @@ http { proxy_pass http://api; } + location ~* \.(?:html)$ { + try_files $uri /index.html; + } + location / { try_files $uri $uri.html $uri/ @api; } diff --git a/ui/src/app/app-routing.module.ts b/ui/src/app/app-routing.module.ts index a7ebe8f..8f09ffb 100644 --- a/ui/src/app/app-routing.module.ts +++ b/ui/src/app/app-routing.module.ts @@ -9,7 +9,7 @@ const routes: Routes = [ component: IndexComponent, }, { - path: 'faq', + path: 'faq.html', component: FaqComponent, }, ]; diff --git a/ui/src/app/index/index.component.html b/ui/src/app/index/index.component.html index 54668bb..ff2f6a3 100644 --- a/ui/src/app/index/index.component.html +++ b/ui/src/app/index/index.component.html @@ -41,6 +41,6 @@ - +