Cannot call routed component from cloudfront url

Viewed 21

I am trying to access to routed components from cloudfront url, one is with default path navigated to surveyDashboard which I am able to do. But another one is with route path /takesurvey should be navigated to takesurvey component which when tried to access through cloudfront url i am getting an error as access denied.

angular routing in app-routing.module.ts:-

const routes: Routes = [
{ path: '', redirectTo: '/surveyDashboard', pathMatch: 'full' },
{ path: 'surveyDashboard', component: SurveyDashboardComponent },

{ path: 'takesurvey', redirectTo: '/takesurvey', pathMatch: 'full' },
{ path: 'takesurvey', component: TakeSurveyComponent }
];

API gateway Behaviours:- API Gateway Behaviours

API gateway Origins:- API Gateway Origins

How can I redirected to takesurvey component similar to surveyDashboard with cloudfront url?

URL I used to navigate to surveyDashboard: https://cloudfront-domain/

URL I used to navigate to takesurvey: https://cloudfront-domain/takesurvey (which thown 403 Access Denied)

0 Answers
Related