lib/lotus/configuration.rb in lotusrb-0.3.2 vs lib/lotus/configuration.rb in lotusrb-0.4.0
- old
+ new
@@ -106,10 +106,25 @@
# end
def security
@security ||= Config::Security.new
end
+ # Force ssl redirection if http scheme is set
+ #
+ # @return [Boolean]
+ #
+ # @since 0.4.0
+ #
+ # @see Lotus::Routing::ForceSsl
+ def force_ssl(value = nil)
+ if value
+ @force_ssl = value
+ else
+ @force_ssl || false
+ end
+ end
+
# The root of the application
#
# By default it returns the current directory, for this reason, **all the
# commands must be executed from the top level directory of the project**.
#
@@ -1623,9 +1638,23 @@
# end
#
# # It will use `:backend` layout
def view
@view ||= Config::FrameworkConfiguration.new
+ end
+
+ # This options is used as a bridge between container and router application.
+ #
+ # @return [String, NilClass] path prefix for routes
+ #
+ # @since 0.4.0
+ # @api private
+ def path_prefix(value = nil)
+ if value.nil?
+ @path_prefix
+ else
+ @path_prefix = value
+ end
end
private
# @since 0.2.0
# @api private