From f6b9427de5ed9d6ba2e46c8711bdcd5dfe15768c Mon Sep 17 00:00:00 2001 From: Steven Zou Date: Tue, 14 Mar 2017 18:37:05 +0800 Subject: [PATCH] fix dashboard route issue --- src/ui_ng/proxy.config.json | 42 ++++++++++++++++++++++ src/ui_ng/src/app/harbor-routing.module.ts | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/ui_ng/proxy.config.json diff --git a/src/ui_ng/proxy.config.json b/src/ui_ng/proxy.config.json new file mode 100644 index 000000000..518521657 --- /dev/null +++ b/src/ui_ng/proxy.config.json @@ -0,0 +1,42 @@ +{ + "/api/*": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + }, + "/service/*": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + }, + "/login": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + }, + "/sign_in": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + }, + "/log_out": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + }, + "/sendEmail": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + }, + "/language": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + }, + "/reset": { + "target": "http://10.117.4.165", + "secure": false, + "logLevel": "debug" + } +} \ No newline at end of file diff --git a/src/ui_ng/src/app/harbor-routing.module.ts b/src/ui_ng/src/app/harbor-routing.module.ts index 21bbdea2a..6b625f3d9 100644 --- a/src/ui_ng/src/app/harbor-routing.module.ts +++ b/src/ui_ng/src/app/harbor-routing.module.ts @@ -44,7 +44,7 @@ const harborRoutes: Routes = [ children: [ { path: 'sign-in', component: SignInComponent, canActivate: [SignInGuard] }, { path: 'sign-up', component: SignUpComponent }, - { path: 'dashboard', component: StartPageComponent }, + { path: 'dashboard', component: StartPageComponent, canActivate: [AuthCheckGuard]}, { path: 'projects', component: ProjectComponent,