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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    api error: You need to sign in or sign up before continuing. (nginx)

    Chatwoot
    2
    5
    305
    Loading More Posts
    • 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.
    • yairShiloach
      yairShiloach last edited by

      When we try to connect using api we get error 401.
      As it stands, it has to do with nginx settings:
      https://www.chatwoot.com/docs/self-hosted/deployment/caprover#api-requests-failing-with-you-need-to-sign-in-or-sign-up-before-continuing
      How do i resolve this issue?

      yairShiloach 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff last edited by

        I just fixed this yesterday. Issue is related to the user of underscores in headers with nginx - https://www.chatwoot.com/docs/self-hosted/deployment/caprover#api-requests-failing-with-you-need-to-sign-in-or-sign-up-before-continuing . I have fixed our code to add that config by default in nginx from the next release. The reason why this is disabled by default is documented here - https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#missing-disappearing-http-headers (it might conflict with CGI headers, which is not a problem for Cloudron).

        If you can't wait for the next release, what you can do for the moment is:

        1. Edit /home/yellowtent/box/src/nginxconfig.ejs . Then add this line https://git.cloudron.io/cloudron/box/-/commit/9bb5096f1cd8a03d50d5f60ba6eb29dcd56fd9b2

        2. After that, go to Cloudron dashboard -> Chatwoot app -> Location page . Then just click save without making any changes. This re-generates the nginx config.

        I could verify the above change works. Before making the above change:

        $ curl -H 'api_access_token: yy'  https://chatwoot.xx/api/v1/accounts/0/teams
        {"errors":["You need to sign in or sign up before continuing."]}
        

        After making the above change:

        $ curl -H 'api_access_token: yy'  https://chatwoot.xx/api/v1/accounts/1/teams
        []
        
        yairShiloach 1 Reply Last reply Reply Quote 0
        • yairShiloach
          yairShiloach @girish last edited by

          @girish Thanks for the comment!
          Is there an estimate of when the update should come out?
          We want to make as few code changes as possible to ensure there are no other glitches in the future, and stick to your versions

          girish 1 Reply Last reply Reply Quote 0
          • yairShiloach
            yairShiloach @yairShiloach last edited by

            @yairShiloach its work! thanks

            1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @yairShiloach last edited by

              @yairShiloach We will have a 7.1.4 later this week or early next week.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB