feat: allow public monitor route without login and add monitor page
This commit is contained in:
@@ -22,7 +22,9 @@ api.interceptors.response.use(
|
||||
(err) => {
|
||||
if (err.response?.status === 401) {
|
||||
localStorage.removeItem('token')
|
||||
if (window.location.pathname !== '/login') {
|
||||
const path = window.location.pathname
|
||||
const publicPaths = ['/monitor', '/login']
|
||||
if (!publicPaths.some((p) => path.startsWith(p))) {
|
||||
window.location.href = '/login'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user