Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
{
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://localhost:5001"
      },
      "Https": {
        "Url": "https://localhost:5000",
        "Certificate": {
          "Path": "YOUR_CERT_PATH",
          "Password": "CERT_PASSWORD"
        }
      }
    }
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  }
}

Необходимо заполнить следующие поля:

НаименованиеОписаниеПример
Url

Адрес, по которому будет доступен сервер.

Настраивается как для http, так и для https.

https://127.0.0.1:5000

http://127.0.0.1:5001

Path

Путь до сертификата.

Warning

Сертификат должен иметь расширение *.pfx


Certs/cert.pfx
PasswordПароль сертификата123456


Expand
titleПример результата
Code Block
languagejson
{
  "Kestrel": {
    "Endpoints": {
      "Http": {
        "Url": "http://127.0.0.1:5001"
      },
      "Https": {
        "Url": "https://127.0.0.1:5000",
        "Certificate": {
          "Path": "Certs/cert.pfx",
          "Password": "123456"
        }
      }
    }
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  }
}

...