Skip to content

Commit

Permalink
redirect page in the frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
kayra1 committed Aug 9, 2024
1 parent 1c4afd7 commit 3ddb463
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions internal/api/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ func newFrontendFileServer() http.Handler {

return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path
if strings.HasSuffix(path, "/") || path == "/" {
path = "/certificate_requests.html"
} else if !strings.Contains(path, ".") {
if !strings.HasSuffix(path, "/") && !strings.Contains(path, ".") {
path += ".html"
}
r.URL.Path = path
Expand Down
7 changes: 7 additions & 0 deletions ui/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client"
import { useRouter } from "next/navigation"

export default function FrontPage() {
const router = useRouter()
router.push("/certificate_requests")
}

0 comments on commit 3ddb463

Please sign in to comment.