Copy link to clipboard
Copied
Like this
Copy link to clipboard
Copied
You can't, securely, use PDF Services via a client-side application. You need to have server-side code to act as a proxy. I haven't used Blazor, but if I were building a VueJS SPA, or any other front-end only app, I'd combine it with Amazon Lambda, Azure Functions, or other serverless providers, so that I could make the calls to that code, have it make the secured call to our APIs, and then pass the result back to the front end.
Copy link to clipboard
Copied
That makes sense. You don't want customers triggering these requests straight from their browser, but that shouldn't be a problem for Blazor Server-side apps which is what this app is using. I didn't specify that this app is not a Blazor WebAssembly (client-side) app but a server-side one, so that's my mistake.
Since this problem was posted, I've managed to connect these values hard-typed in appsettings.json using .Net's IConfiguration so I think I'm good, but if I'm missing anything or should be aware of anything else please let me know.
Copy link to clipboard
Copied
I'm not a DotNet person, but that sounds cool to me. In Node, I use environment variables, and when testing locally, dotenv, to make it simpler.