Aspnetcore: Question : Disable HTTPS for development

Created on 3 Jul 2018  路  5Comments  路  Source: dotnet/aspnetcore

_From @orassr on July 3, 2018 18:43_

I set the baseUrl to http://localhost:5000 - NO HTTPS
but the request at the browser shows :
Request URL: https://localhost:5001/api/auth/login
how can avoid HTTPS at development time temporary?

_Copied from original issue: dotnet/core#1750_

Most helpful comment

That's the best fix for this.

All 5 comments

there is one option in VS2017 EnableSSL in the debug tab in properties of your project , tried to uncheck ?

Its more like a quick fix but it works for me at this point
At the launchSettings.json file :

"DatingApp": { "commandName": "Project", "launchBrowser": true, "launchUrl": "api/values", "applicationUrl": "https://localhost:5001;http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }

And took off the 5001 port.

"DatingApp": { "commandName": "Project", "launchBrowser": true, "launchUrl": "api/values", "applicationUrl": "http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }

That's the best fix for this.

Closing because we are not planning any changes in this area.

What if I only want http for dev env, and https for prod, do we have to keep editing the launch settings config?

Was this page helpful?
0 / 5 - 0 ratings