我已经用 ssl 设置了一个 hunchentoot 服务器。我希望将常规 http 请求重定向到 https。
似乎某种组合hunchentoot:define-easy-handler和hunchentoot:redirect是要走的路,但我无法弄清楚。
这是我到目前为止所拥有的:
(defvar *https-handler*
(make-instance 'hunchentoot:easy-ssl-acceptor
:name 'ssl
:ssl-privatekey-file #P"/path/to/privkey.pem"
:ssl-certificate-file #P"/path/to/cert.pem"
:port 443))
(hunchentoot:start *https-handler*)
Run Code Online (Sandbox Code Playgroud)