diff --git a/app/pods/not-found/route.js b/app/pods/not-found/route.js
new file mode 100644
index 0000000..5be93bf
--- /dev/null
+++ b/app/pods/not-found/route.js
@@ -0,0 +1,11 @@
+import Ember from 'ember';
+
+export default Ember.Route.extend({
+ redirect: function() {
+ let url = this.router.location.formatURL('/not-found');
+
+ if (window.location.pathname !== url) {
+ this.transitionTo('/not-found');
+ }
+ }
+});
diff --git a/app/pods/not-found/template.hbs b/app/pods/not-found/template.hbs
new file mode 100644
index 0000000..4952a23
--- /dev/null
+++ b/app/pods/not-found/template.hbs
@@ -0,0 +1,3 @@
+{{#x-application invalidateSession="invalidateSession"}}
+
404 Not Found
+{{/x-application}}
diff --git a/app/pods/protected/route.js b/app/pods/protected/route.js
index a665e94..4962dab 100644
--- a/app/pods/protected/route.js
+++ b/app/pods/protected/route.js
@@ -9,4 +9,11 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
return this.store.find('user', user.sub);
},
+ actions: {
+ error: function() {
+ this.transitionTo('/not-found');
+ },
+
+ },
+
});
diff --git a/app/router.js b/app/router.js
index 3b3655a..f5cc4af 100644
--- a/app/router.js
+++ b/app/router.js
@@ -16,6 +16,8 @@ Router.map(function() {
});
});
+ this.route('not-found', { path: '/*path' });
+
this.route('protected', { path: '/' }, function() {
this.route('about');