whgrs1692
Unable to connect to containerised postgres from webapi container ( on Ubuntu)
I have a docker compose ( webapi + postgres) that runs correctly.
However, when I try and run dotnet ef database update, it throws a Socket Error:
dotnet ef database update
Build started...
Build succeeded.
System.Net.Sockets.SocketException (00000001, 11): Resource temporarily unavailable
So, I docker exec into the webapi container ( which has a psql client) and I create a connection to the postgres container. The connection is established no problem. This proves the containers can communicate.
So what is going on when the dotnet ef command runs? Cant really post it on ef github cause they will just throw it out.
Where to next?
7 replies
How do I pass through JWT token and customer headers
Not sure this approach is right.
I have a webapi that will receive a bearer token and a custom header that it needs to pass on to another Api. ( Supabase PostgresSql ) from a front end client local storage. ( Blazor WASM).
This paradigm has all the auth on the Supabase Postgrest Api. I'm not sure this is the best way to do it.
Question: How do I access the JWT token and the custom header in the webapi post method? Is it simply a matter of grabbing the values from the HttpContext?
3 replies