Show how to disable HTTP (#22298)
parent
5c34613741
commit
71273173e3
|
@ -29,6 +29,8 @@ No API can prevent a client from sending sensitive data on the first request.
|
|||
> * Not listen on HTTP.
|
||||
> * Close the connection with status code 400 (Bad Request) and not serve the request.
|
||||
>
|
||||
> To disable HTTP redirection in an API, set the `ASPNETCORE_URLS` environment variable or use the `--urls` command line flag. For more information, see <xref:fundamentals/environments> and [5 ways to set the URLs for an ASP.NET Core app](https://andrewlock.net/5-ways-to-set-the-urls-for-an-aspnetcore-app/) by Andrew Lock.
|
||||
>
|
||||
> ## HSTS and API projects
|
||||
>
|
||||
> The default API projects don't include [HSTS](#hsts) because HSTS is generally a browser only instruction. Other callers, such as phone or desktop apps, do **not** obey the instruction. Even within browsers, a single authenticated call to an API over HTTP has risks on insecure networks. The secure approach is to configure API projects to only listen to and respond over HTTPS.
|
||||
|
|
Loading…
Reference in New Issue