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?
@nanan1993 Can you share the full output of the command? It should show some instructions on how to set up a cert. Also, what platform are you running on? Thanks.
Thanks for your quick reply.
I worked on Win10 locally.
Here is the instructions you mentioned and I know how it will work.

I am wondering if we can straightly use command func host start --port 5007 --useHttps to start but not to add "--cert certificate.pfx" every time. As I remember, when testing webapi, I do not need to know where the .pfx file is.
What exactly I want is a way to automatically generate a default debug cert and use it when start functions. So that I do not necessarily need to create a cert file by myself. Creating, Trusting , Adding cert file ... all the things will be done by tools, I just need to say "hey, I want a https trigger" and every thing prepared for me like a magic. As I know webapi did it when I debug.
Do we have it in azure function?
Most helpful comment
Thanks for your quick reply.

I worked on Win10 locally.
Here is the instructions you mentioned and I know how it will work.
I am wondering if we can straightly use command
func host start --port 5007 --useHttpsto start but not to add "--cert certificate.pfx" every time. As I remember, when testing webapi, I do not need to know where the .pfx file is.What exactly I want is a way to automatically generate a default debug cert and use it when start functions. So that I do not necessarily need to create a cert file by myself. Creating, Trusting , Adding cert file ... all the things will be done by tools, I just need to say "hey, I want a https trigger" and every thing prepared for me like a magic. As I know webapi did it when I debug.
Do we have it in azure function?