Azure / Azure/azure-functions-core-tools

How can I test azure function with https easily in local?

Open
#2,047 6 comments 3 reactions 0 assignees View on GitHub
bug Needs: Attention :wave:
Dominant language
C#
Stars
1.5k
Forks
498
Avg merge
5d 4h
Merged PRs (30d)
15

Description

I want to test Azure Function Http trigger locally on windows.

When I run ```func start --port 5007 --useHttps```
I got error : Auto cert generation is currently not working on the .NET Core build.

It seems like that I should use command ```func start --port 5007 --useHttps --cert certificate.pfx ``` after I creating a self-signed certificate locally.

Is there a way to enable https easily?

The way like when I use .net core webapi, I easily export env:ASPNETCORE_URLS=https://localhost. Then I set up https well. Do we have some thing like this?

Or if ```func start --port 5007 --useHttps``` is enough but I missed some configuration?

Contributor guide

Open the contributing guide

Research direction

Start with the `func start --port 5007 --useHttps` command and the reported .NET Core auto-certificate error on Windows. Compare it with the `--cert certificate.pfx` path and the ASPNETCORE_URLS example. Done means local HTTPS works through a documented or implemented configuration without requiring unclear certificate setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.