Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
feat(https): Add HTTPS setup for devserver
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Nov 28, 2023
1 parent 50fe7c0 commit bc2e4ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
15 changes: 15 additions & 0 deletions src/docs/environment/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ by `dev.py` if it exists.

Please refer to [Frontend Development Server](/frontend/development-server/) and [Backend Development Server](/backend/development-server/) for alternative ways to bring up the Sentry UI.

### Enabling HTTPS

You may wish to run the development server in HTTPS mode. This can be done by generating and installing local certificates.

We will be using [mkcert](https://github.com/FiloSottile/mkcert) to create and install a locally-trusted, development certificate. The following will install `mkcert` and then create and install the local certificates.

```shell
brew install mkcert
brew install nss # if you use Firefox
yarn mkcert-localhost
```

Running `sentry devserver` will automatically use HTTPS when the certificates have been installed.


### Ingestion Pipeline (Relay)

Some services are not run in all situations. Among those are <Link to="/services/relay/">Relay</Link> and the ingest workers. If you need
Expand Down
10 changes: 2 additions & 8 deletions src/docs/frontend/development-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,9 @@ If you see an error similar to the below when accessing the development server:

![your connection is not private example](../img/connectionNotPrivate.png)

You can either grant a temporary exception in your browser, or create and install a local certificate and use your OS to mark them as "trusted". The instructions below will show you how to create and install a local certificate.
You can either grant a temporary exception in your browser, or create and install a local certificate and use your OS to mark them as "trusted". SSL is required for the frontend development service, since the production API is served over https.

We will be using [mkcert](https://github.com/FiloSottile/mkcert) to create and install a locally-trusted, development certificate. The following will install `mkcert` and then create and install the local certificates.

```shell
brew install mkcert
brew install nss # if you use Firefox
yarn mkcert-localhost
```
Follow the steps [To Enable HTTPS for your devserver](/environment/#enabling-https).

You can now run the dev server with `yarn dev-ui` and open [https://localhost:7999](https://localhost:7999). There should not see a warning about your connection not being private. You should also see a lock or similar icon in the address bar of your browser.

Expand Down

0 comments on commit bc2e4ea

Please sign in to comment.