API calls redirect to Login Page
-
So I'm trying to get the api to work. Whenever I make an api call, even a simple get request for the uptime status, I get the Stirling PDF login page returned as html. When I use the Swagger page to make the call to my domain, it works. Is this a CORS/Origin issue somehow? Is there some AUTH workflow I missed?
This happens in n8n, curl on my mac, and Postman.
-
@DrewHasQuestions I guess the app is behind Cloudron Proxy Auth . When you install the app, you can choose to install it without any authentication ("Leave user management to the app" option). Once installed without authentication, you can make API calls.
That said... I was looking into Stirling again. It seems it has proper auth now - https://github.com/Frooodle/Stirling-PDF/tree/main#login-authentication . The Cloudron proxy auth was added at a time when Stirling had no authentication. Maybe we should move the package to use that instead.
-
OK awesome, that did the trick. It would definitely be great to at least have basic auth for both the gui and api.
-
-
-
@DrewHasQuestions The new package now uses Stirling's built-in auth