Reputation: 1
There is an Angular 2 based application with two routes:
const appRoutes: Routes = [
{
path: 'home',
component: HomeComponent
},
{
path: 'login',
component: LoginComponent
}
];
The "/home" route should go to "http://mysite/home" and "/login" should go to "https://mysite/login". Please pay attention the first one starts with "http://" and the second one starts with "https://". How is it possible to configure the router to use different origins for routes? Or at least http / https for the same origin?
Upvotes: 0
Views: 1172
Reputation: 3575
This is not something particular to Angular2. The routing takes whatever the schema is from the URL when you load the application. You have a couple of options to get the login to require HTTPs.
Upvotes: 1