Mojolicious over HTTPS

后端 未结 1 396
甜味超标
甜味超标 2021-02-06 04:52

I am using Mojolicious for a web app that requires an encrypted connection, but I don\'t know how to add SSL support to Mojolicious.

My coworker sent me these: files do

1条回答
  •  花落未央
    2021-02-06 05:14

    Found how to do it:

    sub startup {
    my $self = shift;
    $self->secrets(['secretphrase']);
    $self->config(hypnotoad => {
          listen => ['https://*:443?cert=/etc/tls/domain.crt&key=/etc/tls/domain.key']
      });
    

    0 讨论(0)
提交回复
热议问题