mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
lang/rest: prompt for self-signed/invalid certs
This commit is contained in:
@ -4,6 +4,14 @@
|
|||||||
:mode ("\\.http\\'" . restclient-mode)
|
:mode ("\\.http\\'" . restclient-mode)
|
||||||
:config
|
:config
|
||||||
(set-popup-rule! "^\\*HTTP Response" :size 0.4 :quit 'other)
|
(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
|
(map! :mode restclient-mode
|
||||||
:n [M-return] 'restclient-http-send-current
|
:n [M-return] 'restclient-http-send-current
|
||||||
:localleader
|
:localleader
|
||||||
|
Reference in New Issue
Block a user