Tuesday, December 25, 2018

Will https be activated once I deploy my app?

I've finished my app done in ASP.NET Core WebAPI and Angular 6 on frontend and I plan to put it in a docker container (or deploy straight away if I somehow fail with docker) and deploy it. Instructor I've been following, didn't do anything particular regarding https protocol and he even commented out

app.UseHsts(); app.UseHttpsRedirection(); 

in Startup.cs. After following his publishing section (he uploads to DO and azure), he ends up with http protocol on DO, but https on azure (I assume azure does that automatically). I've already bought domain name and SSL cert from namecheap (I know I could get it for free, but it was just $1) and I have DO acc and another VPS. My plan is to deploy on DO, but I'm not sure will SSL and https work straight away if I just point them out to deployed app, so I'm not sure do I have to change anything?

While I followed instructor, the whole app was under http, but I uncommented out above two lines, run API with

dotnet dev-certs https --trust 

but I still see "Your connection is not secure" on Firefox. Regardless, I tested API with Postman and it works, but Angular doesn't work, since it's only allow me to login, but can't retrieve the data, because I assume angular server is listening on http://localhost:4200/.

Do I have to do something like this on angular side or it will be automatically done once I do a production build?

Will https be activated once I deploy my app? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team