[from now] 2014/03/09 19:26:29

diff --git a/lib/octogate/server.rb b/lib/octogate/server.rb
index b0924f8..b348003 100644
--- a/lib/octogate/server.rb
+++ b/lib/octogate/server.rb
@@ -11,18 +11,30 @@ class Octogate::Server < Sinatra::Base
     enable :logging
   end

-  get '/received_events' do
+  get '/:token/received_events' do
+    unless Octogate.config.token == params[:token]
+      status 403
+      body "Access forbidden"
+      return
+    end
+
     received = Octogate.received
     haml :received_events, locals: {received: received}
   end

-  get '/sent_events' do
+  get '/:token/sent_events' do
+    unless Octogate.config.token == params[:token]
+      status 403
+      body "Access forbidden"
+      return
+    end
+
     sent = Octogate.sent
     haml :sent_events, locals: {sent: sent}
   end

   post '/:token' do
-    unless Octogate.conffig.token == params[:token]
+    unless Octogate.config.token == params[:token]
       status 403
       body "Access forbidden"
       return
diff --git a/web/views/sent_events.haml b/web/views/sent_events.haml
new file mode 100644
index 0000000..a81ffbb
--- /dev/null
+++ b/web/views/sent_events.haml
@@ -0,0 +1,24 @@
+!!! 5
+%html
+  %head
+    %title Octogate Sent Events
+    %link{rel: "stylesheet", href: "/bootstrap/css/bootstrap.css"}
+
+%body
+  %h2 Octogate Sent Events (Recently 100 Targets)
+  %table.table
+    %thead
+      %tr
+        %th Delivery ID
+        %th Event Name
+        %th Target Name
+        %th URL
+        %th Sent at
+    %tbody
+      - sent.each do |s|
+        %tr
+          %td= s.delivery_id
+          %td= s.name
+          %td= s.target_name
+          %td= s.target_url
+          %td= s.sent_at.strftime("%Y/%m/%d %H:%M:%S")
diff --git a/web/views/sent_targets.haml b/web/views/sent_targets.haml
deleted file mode 100644
index a81ffbb..0000000
--- a/web/views/sent_targets.haml
+++ /dev/null
@@ -1,24 +0,0 @@
-!!! 5
-%html
-  %head
-    %title Octogate Sent Events
-    %link{rel: "stylesheet", href: "/bootstrap/css/bootstrap.css"}
-
-%body
-  %h2 Octogate Sent Events (Recently 100 Targets)
-  %table.table
-    %thead
-      %tr
-        %th Delivery ID
-        %th Event Name
-        %th Target Name
-        %th URL
-        %th Sent at
-    %tbody
-      - sent.each do |s|
-        %tr
-          %td= s.delivery_id
-          %td= s.name
-          %td= s.target_name
-          %td= s.target_url
-          %td= s.sent_at.strftime("%Y/%m/%d %H:%M:%S")