Sha256: 499ad8e1e33605df05ed5e7f10ec3ab29387536bb11825a9c7cc0a207a634f30
Contents?: true
Size: 979 Bytes
Versions: 5
Compression:
Stored size: 979 Bytes
Contents
#!/usr/bin/env rackup # frozen_string_literal: true require_relative 'config/environment' require 'rack/freeze' if RACK_ENV == :production # Handle exceptions in production with a error page and send an email notification: use Utopia::Exceptions::Handler use Utopia::Exceptions::Mailer else # We want to propate exceptions up when running tests: use Rack::ShowExceptions unless RACK_ENV == :test end use Utopia::Static, root: 'public' use Utopia::Redirection::Rewrite, '/' => '/welcome/index' use Utopia::Redirection::DirectoryIndex use Utopia::Redirection::Errors, 404 => '/errors/file-not-found' require 'utopia/localization' use Utopia::Localization, default_locale: 'en', locales: ['en', 'de', 'ja', 'zh'] require 'utopia/session' use Utopia::Session, expires_after: 3600 * 24, secret: ENV['UTOPIA_SESSION_SECRET'], secure: true use Utopia::Controller use Utopia::Static # Serve dynamic content use Utopia::Content run lambda { |env| [404, {}, []] }
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
utopia-2.12.4 | setup/site/config.ru |
utopia-2.12.3 | setup/site/config.ru |
utopia-2.12.2 | setup/site/config.ru |
utopia-2.12.1 | setup/site/config.ru |
utopia-2.12.0 | setup/site/config.ru |