diff --git a/modules/lang/rest/config.el b/modules/lang/rest/config.el index 9b54b78c7..0e6340597 100644 --- a/modules/lang/rest/config.el +++ b/modules/lang/rest/config.el @@ -4,6 +4,14 @@ :mode ("\\.http\\'" . restclient-mode) :config (set-popup-rule! "^\\*HTTP Response" :size 0.4 :quit 'other) + + ;; Forces underlying SSL verification to prompt for self-signed or invalid + ;; certs, rather than silently reject them. + (defun +rest*permit-self-signed-ssl (orig-fn &rest args) + (let (gnutls-verify-error tls-checktrust) + (apply orig-fn args))) + (advice-add #'restclient-http-do :around #'+rest*permit-self-signed-ssl) + (map! :mode restclient-mode :n [M-return] 'restclient-http-send-current :localleader