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. Support
  3. Healthcheck for protected custom Node apps

Healthcheck for protected custom Node apps

Scheduled Pinned Locked Moved Support
health
6 Posts 4 Posters 1.2k Views 4 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.
    • P Offline
      P Offline
      pdubs
      wrote on last edited by
      #1

      Hi All-

      I have a custom Node app that runs smoothly and passes the Healthcheck when the homepage is not protected.

      However, if I try to protect the whole app including the homepage, I get "Not Responding" in my dashboard. I saw that for LAMP apps there is an easy fix here by editing the .htaccess file -- but how do I fix this for a Node app?

      Sincere thanks,

      Phil

      1 Reply Last reply
      0
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        This would highly depend on the kind of node app. For LAMP there is a http server (apache) running, which serves up a folder tree. This may or may not be the case for a nodejs server, but it is part of the app code itself and there is no such universal concept of htaccess like for apache.

        Which nodejs app are you referring to?

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #3

          @pdubs For custom apps, simply add a special route in your nodejs app like /cloudron_healthcheck and make it return a http status code 200. Then fixup the healthCheckPath of your app's CloudronManifest.json.

          1 Reply Last reply
          0
          • LonkleL Offline
            LonkleL Offline
            Lonkle
            wrote on last edited by
            #4

            I can do things like this but there's an app I'm editing right now for Cloudron that has a token capability and no place for a "whitelist" URL so I have to code one - there are a few web apps that are allowed to be "tokened" shut. It would be nice to be able to provide within the "health path" /?token=abcdefg in the Cloudron.manifest just like I would the URL when accessing it...does that work already or would those be considered invalid characters? This is for custom development, of course. It would speed up the process of porting over new changes that open source projects have while still maintaining instant security.

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              @Lonk mm, given the CloudronManifest.json is checked into a git repo, would it not be dangerous to put the token in the health path? But otherwise, ?token=xx should indeed work already.

              LonkleL 1 Reply Last reply
              0
              • girishG girish

                @Lonk mm, given the CloudronManifest.json is checked into a git repo, would it not be dangerous to put the token in the health path? But otherwise, ?token=xx should indeed work already.

                LonkleL Offline
                LonkleL Offline
                Lonkle
                wrote on last edited by Lonkle
                #6

                @girish Yes yes, this would only be for development purposes (since placing the token in CloudronManifest would, of course, be silly).

                This would be just to pass the healthcheck so I don't expose anything while developing on a public domain.

                Thanks for letting me know it'll work, it'll help with an app I'm porting.

                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