thomasduft/microwf

WebClient not working anymore

Closed this issue · 1 comments

After merging your fix for #11 (which did solve the problem) in my fork, my WebClient stopped working.
I then cloned your repo again, and I see that the WebClient form your repo isn't working either,
Since I'm a Vue.Js guy and not an angular expert, I don't now where to fix the error, but I see that the request are done to http://localhost:4200 (The url of the Webclient, not the one of the WebAPI)

http://localhost:4200/api/workflow/definitions

It should go to

https://localhost:5001/api/workflow/definitions

I hardcoded the url in the

microwf/samples/WebClient/src/app/shared/services/api.service.ts

because I don't know where the API base url is saved in angular, but then i get tls errors. (I suppose it's because you removed the certification entry in the settings files.)

Well, there are several points. First I can confirm that running it under an Linux based machine the entire setup of a dev certificate and serving the app over "https" is still not an easy task. Also running the dotnet command "dotnet dev-certs https" which should setup a dev certificate that the localmachine trusts is not working anymore on my machine. On a windows based machine it is running fine.

So what I am going to do is to run all my samples over http to avoid having troubles with different environments. I don't want to explain to everybody how security in dotnet works. There are plenty of resources out there and personnally I am not an expert in that area. I also think if you dockerize such application that the certification stuff should be handled and ending at a reverse proxy like nginx for instance. Every other party should be save behind the reverse proxy or what do you think?

Other questions: In angular you can define some proxy settings while serving the application with the local dev webserver. You can find that in the root directory of the WebClient project (local.proxy.conf.js). In it you see that every request starting with "/api, /connect" will be redirected to the WebApi endpoint. So there is no need to hardcode some urls. Pretty handy stuff what the angular cli offers.

Hope that helps. I will try to changed the samples to only use "http" today in order to avoid plattform issues in the future. But just keep in mind that every webapp should basically run by default with "https".

Cheers Thomas