Rafael Ruiz Muñoz
Rafael Ruiz Muñoz

Reputation: 5473

Parse Dashboard can only be remotely accessed via HTTPS

I'm trying to deploy a Parse Server and Parse Dashboard on my DigitalOcean's server. I installed through docker-compose on this git: https://github.com/yongjhih/docker-parse-server

When I access to it, http://rafael-ruiz.es:4040 it says:

Parse Dashboard can only be remotely accessed via HTTPS

so these are my solutions:

1.- According to Parse (https://github.com/ParsePlatform/parse-dashboard)

Deploying in production

If you're deploying to a provider like Heroku, or Google App Engine, the SSL endpoint is terminated early and handled by the provider and you may encounter this error: Parse Dashboard can only be remotely accessed via HTTPS.

Before going further, make sure your server cannot be reachable via HTTP. See the provider documentation for force HTTPS connections to your deployment.

Set the environment variable PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 to tell parse server to skip the secure tests.

so I set my environment variable to 1. But nothing happend.

2.- I have ALREADY https enabled (try https://rafael-ruiz.es). But when I try: https://rafael-ruiz.es:4040 it doesn't work.

What's wrong with this?

Thanks.


QUESTION:

Can it be because I have to configure some ports with my SSL certificate?

Upvotes: 10

Views: 7551

Answers (3)

fewcodes
fewcodes

Reputation: 321

The change is

app.use('/parse-dashboard', new ParseDashboard(config.dashboard, { allowInsecureHTTP: true }));

instead of

app.use('/parse-dashboard', ParseDashboard(config.dashboard, true));

you will find this code in index.js

Upvotes: 2

Arjun Shukla
Arjun Shukla

Reputation: 337

Follow these steps to get parse dashboard running and accessible over public ip:

  1. Create a config file your-config-filename.json
  2. Add the following json structure to it and don't forget to replace with your app values:

{
  "apps": [
    {
      "serverURL": "https://api.parse.com/1",
      "appId": "myAppId",
      "masterKey": "myMasterKey",
      "javascriptKey": "myJavascriptKey",
      "restKey": "myRestKey",
      "appName": "My Parse.Com App"
    },
    {
      "serverURL": "http://localhost:1337/parse",
      "appId": "myAppId",
      "masterKey": "myMasterKey",
      "appName": "My Parse Server App"
    }
  ],
"users": [
    {
      "user":"user1",
      "pass":"pass"
    },
    {
      "user":"user2",
      "pass":"pass"
    }
  ]
}

  1. Save the config file and run the following command:

parse-dashboard --config <your-config-filename>.json --allowInsecureHTTP true

Enjoy!

Upvotes: 5

For first way: you can use "--allowInsecureHTTP true" parameter on command line and for authentication use users section of config file:

   {
      "apps": [...],
      "users": [
      {
           "user":"user1",
           "pass":"pass"
      },
      {
           "user":"user2",
           "pass":"pass"
      }
   ]
 }

Upvotes: 6

Related Questions