1
mirror of https://gitlab.com/jessieh/simple-shortener.git synced 2024-12-22 05:41:47 +00:00

Improve user-facing warnings

This commit is contained in:
Jessie Hildebrandt 2021-12-21 00:50:20 -05:00
parent 683ebeea9e
commit 09a00637f6
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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))