Angular 2: Block GET request on a URL
<p>I have URLs as <code>http://www.localhost:4200/profile</code> and <code>http://www.localhost:4200/editProfile</code>. Both URLs are served to a logged in user. Now I want the accessibility of <code>/editProfile</code> only through the navigation menu available and not by directly writing the URL on address bar and pressing enter. If the user does so, he is redirected to <code>/profile</code> path. </p>

<p>Something similar to allowing POST on <code>/editProfile</code> but no GET.</p>

<p>Can it be achieved using CanActivate available at the routes module?</p>

<p>Thanks</p>