docs(dashboard-v2): add notes on how to run HTTPs locally

This commit is contained in:
Michał Leszczyk 2022-03-23 11:30:19 +01:00
parent 2f1b176a09
commit 7dea4674f6
No known key found for this signature in database
GPG Key ID: FA123CA8BAA2FBF4
2 changed files with 16 additions and 0 deletions

View File

@ -8,3 +8,18 @@ This is a Gatsby application. To run it locally, all you need is:
- `yarn install`
- `yarn start`
## Accessing remote APIs
To be able to log in on a local environment with your production credentials, you'll need to make the browser believe you're actually on the same domain, otherwise browser will block the session cookie.
To do the trick, edit your `/etc/hosts` file and add a record like this:
```
127.0.0.1 local.skynetpro.net
```
then run `yarn secure` -- it will run `gatsby develop` with `--https --host=local.skynetpro.net -p=443` options.
If you're on macOS, you may need to `sudo` the command to successfully bind to port `443`.
> **NOTE:** This should become easier once we have a docker image for the new dashboard.

View File

@ -10,6 +10,7 @@
"scripts": {
"develop": "gatsby develop",
"start": "gatsby develop",
"secure": "gatsby develop --https --host=local.skynetpro.net -p=443",
"build": "gatsby build",
"serve": "gatsby serve",
"clean": "gatsby clean",