lib/hanami/generators/app/application.rb.tt in hanami-1.0.0.beta2 vs lib/hanami/generators/app/application.rb.tt in hanami-1.0.0.beta3

- old
+ new

@@ -11,11 +11,13 @@ # Define the root path of this application. # All paths specified in this configuration are relative to path below. # root __dir__ - # Relative load paths where this application will recursively load the code. + # Relative load paths where this application will recursively load the + # code. + # # When you add new directories, remember to add them here. # load_paths << [ 'controllers', 'views' @@ -45,26 +47,31 @@ # Defaults to "localhost" # # host 'example.org' # URI port used by the routing system to generate absolute URLs - # Argument: An object coercible to integer, default to 80 if the scheme is http and 443 if it's https - # This SHOULD be configured only in case the application listens to that non standard ports + # Argument: An object coercible to integer, defaults to 80 if the scheme + # is http and 443 if it's https # + # This should only be configured if app listens to non-standard ports + # # port 443 # Enable cookies # Argument: boolean to toggle the feature # A Hash with options # - # Options: :domain - The domain (String - nil by default, not required) - # :path - Restrict cookies to a relative URI (String - nil by default) - # :max_age - Cookies expiration expressed in seconds (Integer - nil by default) - # :secure - Restrict cookies to secure connections - # (Boolean - Automatically set on true if currently using a secure connection) - # See #scheme and #ssl? - # :httponly - Prevent JavaScript access (Boolean - true by default) + # Options: + # :domain - The domain (String - nil by default, not required) + # :path - Restrict cookies to a relative URI + # (String - nil by default) + # :max_age - Cookies expiration expressed in seconds + # (Integer - nil by default) + # :secure - Restrict cookies to secure connections + # (Boolean - Automatically true when using HTTPS) + # See #scheme and #ssl? + # :httponly - Prevent JavaScript access (Boolean - true by default) # # cookies true # or # cookies max_age: 300 @@ -79,28 +86,29 @@ # Configure Rack middleware for this application # # middleware.use Rack::Protection # Default format for the requests that don't specify an HTTP_ACCEPT header - # Argument: A symbol representation of a mime type, default to :html + # Argument: A symbol representation of a mime type, defaults to :html # # default_request_format :html - # Default format for responses that doesn't take into account the request format - # Argument: A symbol representation of a mime type, default to :html + # Default format for responses that don't consider the request format + # Argument: A symbol representation of a mime type, defaults to :html # # default_response_format :html # HTTP Body parsers # Parse non GET responses body for a specific mime type - # Argument: Symbol, which represent the format of the mime type (only `:json` is supported) + # Argument: Symbol, which represent the format of the mime type + # (only `:json` is supported) # Object, the parser # # body_parsers :json # When it's true and the router receives a non-encrypted request (http), - # it redirects to the secure equivalent resource (https). Default disabled. + # it redirects to the secure equivalent (https). Disabled by default. # # force_ssl true ## # TEMPLATES @@ -178,29 +186,29 @@ # * https://msdn.microsoft.com/en-us/library/gg622941%28v=vs.85%29.aspx # * https://blogs.msdn.microsoft.com/ie/2008/09/02/ie8-security-part-vi-beta-2-update # security.x_content_type_options 'nosniff' - # X-XSS-Protection is a HTTP header to determine the behavior of the browser - # in case an XSS attack is detected. + # X-XSS-Protection is a HTTP header to determine the behavior of the + # browser in case an XSS attack is detected. # # Read more at: # # * https://www.owasp.org/index.php/Cross-site_Scripting_(XSS) # * https://www.owasp.org/index.php/OWASP_Secure_Headers_Project#X-XSS-Protection # security.x_xss_protection '1; mode=block' - # Content-Security-Policy (CSP) is a HTTP header supported by modern browsers. - # It determines trusted sources of execution for dynamic contents - # (JavaScript) or other web related assets: stylesheets, images, fonts, - # plugins, etc. + # Content-Security-Policy (CSP) is a HTTP header supported by modern + # browsers. It determines trusted sources of execution for dynamic + # contents (JavaScript) or other web related assets: stylesheets, images, + # fonts, plugins, etc. # # Web applications can send this header to mitigate Cross Site Scripting # (XSS) attacks. # - # The default value allows images, scripts, AJAX, fonts and CSS from the same - # origin, and does not allow any other resources to load (eg object, + # The default value allows images, scripts, AJAX, fonts and CSS from the + # same origin, and does not allow any other resources to load (eg object, # frame, media, etc). # # Inline JavaScript is NOT allowed. To enable it, please use: # "script-src 'unsafe-inline'". #