File tree Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Expand file tree Collapse file tree 5 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 23
23
<h1 >Policies</h1 >
24
24
<ul role =" list" >
25
25
<li ><LinkTo @route =" policies" >Usage Policy</LinkTo ></li >
26
- <li ><LinkTo @route =" security" >Security</LinkTo ></li >
26
+ <li ><LinkTo @route =" policies. security" >Security</LinkTo ></li >
27
27
<li ><a href =" https://foundation.rust-lang.org/policies/privacy-policy/" >Privacy Policy</a ></li >
28
28
<li ><a href =" https://www.rust-lang.org/policies/code-of-conduct" >Code of Conduct</a ></li >
29
29
<li ><LinkTo @route =" data-access" >Data Access</LinkTo ></li >
Original file line number Diff line number Diff line change @@ -51,7 +51,11 @@ Router.map(function () {
51
51
} ) ;
52
52
this . route ( 'category-slugs' , { path : 'category_slugs' } ) ;
53
53
this . route ( 'team' , { path : '/teams/:team_id' } ) ;
54
- this . route ( 'policies' ) ;
54
+ this . route ( 'policies' , function ( ) {
55
+ this . route ( 'security' ) ;
56
+ } ) ;
57
+ // The canonical security page is `/policies/security`; this is a redirect to support guessing
58
+ // of the URL to be `/security`.
55
59
this . route ( 'security' ) ;
56
60
this . route ( 'data-access' ) ;
57
61
this . route ( 'confirm' , { path : '/confirm/:email_token' } ) ;
Original file line number Diff line number Diff line change
1
+ import Route from '@ember/routing/route' ;
2
+ import { inject as service } from '@ember/service' ;
3
+
4
+ export default class SecurityRoute extends Route {
5
+ @service router ;
6
+
7
+ redirect ( ) {
8
+ this . router . replaceWith ( 'policies.security' ) ;
9
+ }
10
+ }
Original file line number Diff line number Diff line change 102
102
103
103
<h2 id =' security' >Security</h2 >
104
104
105
- <p >Please see the <LinkTo @route =" security" >Security page</LinkTo >.</p >
105
+ <p >Please see the <LinkTo @route =" policies. security" >Security page</LinkTo >.</p >
106
106
107
107
<h2 id =' sexually-obscene-content' >Sexually Obscene Content</h2 >
108
108
File renamed without changes.
You can’t perform that action at this time.
0 commit comments