mirror of
https://github.com/mistergibson/gxg-server.git
synced 2026-08-15 02:15:59 -07:00
Added publish_route to www
This commit is contained in:
parent
ecc70bfc3a
commit
fca03f29ee
1 changed files with 5 additions and 0 deletions
|
|
@ -57,6 +57,11 @@ www_paths.each_pair do |moniker, path|
|
||||||
end
|
end
|
||||||
# ### Sinatra Bootstrap
|
# ### Sinatra Bootstrap
|
||||||
class Node0 < Sinatra::Application
|
class Node0 < Sinatra::Application
|
||||||
|
def self.publish_route(the_method, path, options={}, &block)
|
||||||
|
route(the_method.to_s.upcase, path, options) do
|
||||||
|
block.call(the_method,request,session)
|
||||||
|
end
|
||||||
|
end
|
||||||
enable :sessions
|
enable :sessions
|
||||||
#use Rack::Session::Cookie, {:key => "rack.session", :expire_after => 318513600, :same_site => :strict, :secure => true}
|
#use Rack::Session::Cookie, {:key => "rack.session", :expire_after => 318513600, :same_site => :strict, :secure => true}
|
||||||
#
|
#
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue