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

Add PUBLIC_PROTOCOL to allow serving from a HTTP endpoint #1043

Merged
merged 1 commit into from Nov 5, 2020

Conversation

tommilligan
Copy link
Contributor

Closes #1042

This PR introduces a new environment variable, PUBLIC_PROTOCOL. If unset, the value defaults to the current hardcoded value of https, with no change in behaviour:

13:46:22.316 pid=<0.2038.0> [info] Running BorsNG.Endpoint with cowboy 1.1.2 at 0.0.0.0:39103 (http)
13:46:22.318 pid=<0.2005.0> [info] Access BorsNG.Endpoint at https://172.17.0.1:39103

If PUBLIC_PROTOCOL=http is set, the endpoint is updated accordingly:

13:48:59.885 pid=<0.2038.0> [info] Running BorsNG.Endpoint with cowboy 1.1.2 at 0.0.0.0:39103 (http)
13:48:59.887 pid=<0.2005.0> [info] Access BorsNG.Endpoint at http://172.17.0.1:39103

This allows the app to run at a HTTP endpoint if HTTPS is not required.

@tommilligan
Copy link
Contributor Author

Opened RFC here for discussion: https://forum.bors.tech/t/rfc-add-a-new-environment-variable-public-protocol-to-allow-serving-bors-at-a-http-endpoint/521

@tommilligan
Copy link
Contributor Author

@notriddle the linked RFC has been open for 2 weeks, currently there has been no feedback.

Are you open to merging as this is a back-compatible change and there have been no objections?

@tommilligan
Copy link
Contributor Author

@notriddle the associated RFC has closed with no further comments. Is this okay to merge?

@notriddle
Copy link
Member

Yeah, it is.

bors r+

bors bot added a commit that referenced this pull request Nov 5, 2020
1043: Add PUBLIC_PROTOCOL to allow serving from a HTTP endpoint r=notriddle a=tommilligan

Closes #1042 

This PR introduces a new environment variable, `PUBLIC_PROTOCOL`. If unset, the value defaults to the current hardcoded value of `https`, with no change in behaviour:

```log
13:46:22.316 pid=<0.2038.0> [info] Running BorsNG.Endpoint with cowboy 1.1.2 at 0.0.0.0:39103 (http)
13:46:22.318 pid=<0.2005.0> [info] Access BorsNG.Endpoint at https://172.17.0.1:39103
```

If `PUBLIC_PROTOCOL=http` is set, the endpoint is updated accordingly:

```log
13:48:59.885 pid=<0.2038.0> [info] Running BorsNG.Endpoint with cowboy 1.1.2 at 0.0.0.0:39103 (http)
13:48:59.887 pid=<0.2005.0> [info] Access BorsNG.Endpoint at http://172.17.0.1:39103
```

This allows the app to run at a HTTP endpoint if HTTPS is not required.

Co-authored-by: Tom Milligan <tom@reinfer.io>
@bors
Copy link
Contributor

bors bot commented Nov 5, 2020

Build failed:

  • continuous-integration/travis-ci/push

@notriddle
Copy link
Member

bors retry

@bors
Copy link
Contributor

bors bot commented Nov 5, 2020

@bors bors bot merged commit c16a89b into bors-ng:master Nov 5, 2020
notriddle added a commit to bors-ng/bors-ng.github.io that referenced this pull request Dec 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard cannot be served over HTTP
2 participants