mirror of
https://gitlab.com/jessieh/simple-shortener.git
synced 2024-11-23 19:51:46 +00:00
Improve user-facing warnings
This commit is contained in:
parent
683ebeea9e
commit
09a00637f6
@ -14,7 +14,6 @@ table.insert( package.loaders, fennel.make_searcher( { correlate = true } ) )
|
||||
-- Disable turbo's static file caching functionality if requested
|
||||
|
||||
if ( os.getenv( 'disable_cache' ) ) then
|
||||
print( 'WARNING: Static file caching is disabled!' )
|
||||
_G.TURBO_STATIC_MAX = -1
|
||||
end
|
||||
|
||||
|
@ -56,10 +56,13 @@
|
||||
(auth_utils.print_totp_qr))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; Print security warning (if secure cookies are disabled)
|
||||
;; Print any applicable warnings
|
||||
|
||||
(when (= _G.TURBO_STATIC_MAX -1)
|
||||
(print "🚧 WARNING: Static file caching is disabled!"))
|
||||
|
||||
(when (not config.use_secure_cookies)
|
||||
(print "WARNING: Secure cookies are disabled!"))
|
||||
(print "🚧 WARNING: Secure cookies are disabled!"))
|
||||
|
||||
;; ---------------------------------- ;;
|
||||
;; Start server
|
||||
@ -67,5 +70,5 @@
|
||||
(let [app (turbo.web.Application:new route_list)
|
||||
ioloop (turbo.ioloop.instance)]
|
||||
(app:listen config.listen_port)
|
||||
(print (.. "Listening on port " (tostring config.listen_port) "."))
|
||||
(print (.. "✅ Listening on port " (tostring config.listen_port) "."))
|
||||
(ioloop:start))
|
||||
|
Loading…
Reference in New Issue
Block a user