File tree 2 files changed +25
-1
lines changed 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ export default (
29
29
< IndexRoute component = { Home } />
30
30
< Route path = "addon/:slug/" component = { DetailPage } />
31
31
< Route path = "addon/:addonSlug/reviews/" component = { AddonReviewList } />
32
- { /* Hack to make the proxy serve this URL from addons-server */ }
32
+ { /* These user routes are to make the proxy serve each URL from */ }
33
+ { /* addons-server until we can fix the :visibleAddonType route below. */ }
34
+ { /* https://github.com/mozilla/addons-frontend/issues/2029 */ }
35
+ { /* We are mimicing these URLs: https://github.com/mozilla/addons-server/blob/master/src/olympia/users/urls.py#L20 */ }
36
+ < Route path = "users/:userAction/" component = { NotFound } />
33
37
{ /* https://github.com/mozilla/addons-frontend/issues/1975 */ }
34
38
< Route path = "user/:user/" component = { NotFound } />
35
39
< Route path = ":visibleAddonType/categories/" component = { CategoryList } />
Original file line number Diff line number Diff line change @@ -66,4 +66,24 @@ describe('AMO GET Requests', () => {
66
66
it ( 'should respond with a 404 to user pages' , ( ) => request ( app )
67
67
. get ( '/en-US/firefox/user/some-user/' )
68
68
. expect ( 404 ) ) ;
69
+
70
+ it ( 'should respond with a 404 to the user edit page' , ( ) => request ( app )
71
+ . get ( '/en-US/firefox/users/edit/' )
72
+ . expect ( 404 ) ) ;
73
+
74
+ it ( 'should respond with a 404 to a specific user edit' , ( ) => request ( app )
75
+ . get ( '/en-US/firefox/users/edit/1234/' )
76
+ . expect ( 404 ) ) ;
77
+
78
+ it ( 'should respond with a 404 to user unsubscribe actions' , ( ) => request ( app )
79
+ . get ( '/en-US/firefox/users/unsubscribe/token/signature/permission/' )
80
+ . expect ( 404 ) ) ;
81
+
82
+ it ( 'should respond with a 404 to deleting a user photo' , ( ) => request ( app )
83
+ . get ( '/en-US/firefox/users/delete_photo/1234/' )
84
+ . expect ( 404 ) ) ;
85
+
86
+ it ( 'should respond with a 404 to any user action' , ( ) => request ( app )
87
+ . get ( '/en-US/firefox/users/login/' )
88
+ . expect ( 404 ) ) ;
69
89
} ) ;
You can’t perform that action at this time.
0 commit comments