Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTTPS in local development #106

Merged
merged 2 commits into from
Feb 13, 2023
Merged

Use HTTPS in local development #106

merged 2 commits into from
Feb 13, 2023

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Feb 12, 2023

  • Install selfsigned.
  • Run the proxy server with a self-signed certificate in development mode.

@eatyourgreens eatyourgreens force-pushed the https-proxy branch 2 times, most recently from b1877f5 to b41cb35 Compare February 13, 2023 09:56
@eatyourgreens
Copy link
Contributor Author

npm start runs in production mode, not development, so the proxy still runs with HTTP. See #126.

- Install `selfsigned`.
- Run the proxy server with a self-signed certificate in local development.
Copy link
Member

@shaunanoordin shaunanoordin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

Affects: proxy server (local development only)

This PR adds self-signed certs to the Proxy Server for local development.

  • Code read looks pretty straightforward
  • Running npm run proxy-server seems to load the Proxy on local with no issues (though there are a bunch of other variables required - e.g. current URL for MS ML service) that would be required for full testing

Testing

In short, try to get the Proxy Server to show an example HTML webpage.

  1. Setup: create an .env file with TARGETS=https://example.com
  2. Run npm run proxy-server
  3. Open https://local.zooniverse.org:3666/?url=https://example.com/index.html in your browser
  4. The content should pretty much match https://example.com/index.html

Status

Looks good, but there's one change required to get this PR merged: changing NODE_ENV to process.env.NODE_ENV

server/proxy-server.js Outdated Show resolved Hide resolved
@eatyourgreens eatyourgreens merged commit a84e06f into master Feb 13, 2023
@eatyourgreens eatyourgreens deleted the https-proxy branch February 13, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants