Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Stirling-PDF
  3. API calls redirect to Login Page

API calls redirect to Login Page

Scheduled Pinned Locked Moved Solved Stirling-PDF
4 Posts 2 Posters 814 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DrewHasQuestionsD Offline
    DrewHasQuestionsD Offline
    DrewHasQuestions
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    1
    • girishG Do not disturb
      girishG Do not disturb
      girish
      Staff
      wrote on last edited by
      #2

      @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.

      1 Reply Last reply
      1
      • DrewHasQuestionsD Offline
        DrewHasQuestionsD Offline
        DrewHasQuestions
        wrote on last edited by
        #3

        OK awesome, that did the trick. It would definitely be great to at least have basic auth for both the gui and api.

        girishG 1 Reply Last reply
        2
        • nebulonN nebulon marked this topic as a question on
        • nebulonN nebulon has marked this topic as solved on
        • DrewHasQuestionsD DrewHasQuestions

          OK awesome, that did the trick. It would definitely be great to at least have basic auth for both the gui and api.

          girishG Do not disturb
          girishG Do not disturb
          girish
          Staff
          wrote on last edited by
          #4

          @DrewHasQuestions The new package now uses Stirling's built-in auth

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search