Change URL protocol in the ocumentation and sample configs to HTTPS (#623)

* Config: Use variables for similar values
* Configs and Documentation: http -> https, except for localhost
This commit is contained in:
Christian Paul 2023-01-13 16:39:34 +01:00 committed by GitHub
parent 9a7839ce42
commit 67fc55af93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 14 deletions

1
changelog.d/623.doc Normal file
View File

@ -0,0 +1 @@
Change URL protocol in the ocumentation and sample configs to HTTPS.

View File

@ -5,7 +5,7 @@ bridge:
#
domain: example.com
url: http://localhost:8008
mediaUrl: http://example.com
mediaUrl: https://example.com
port: 9993
bindAddress: 127.0.0.1
github:
@ -154,7 +154,7 @@ widgets:
- fec0::/10
roomSetupWidget:
addOnInvite: false
publicUrl: http://example.com/widgetapi/v1/static/
publicUrl: https://example.com/widgetapi/v1/static/
branding:
widgetTitle: Hookshot Configuration
permissions:

View File

@ -39,7 +39,7 @@ widgets:
# - 2001:db8::/32
# - ff00::/8
# - fec0::/10
publicUrl: http://example.com/widgetapi/v1/static
publicUrl: https://example.com/widgetapi/v1/static
branding:
widgetTitle: Hookshot Configuration
openIdOverrides:

View File

@ -74,7 +74,7 @@ To begin, configure your `config.yml`:
```yaml
jira:
url: http://yourjirainstance.com # The location of your jira instance.
url: https://yourjirainstance.com # The location of your jira instance.
webhook:
# A secret string generated by you.
secret: Ieph7iecheiThoo1othaineewieSh1koh2chainohtooyoh4waht1oetoaSoh6oh
@ -98,7 +98,7 @@ To start with, set up your JIRA instance to support OAuth.
1. The Application Name can be anything, but for simplicty we usually use `matrix-hookshot`
2. The Application Type should be **Generic Application**
3. The Consumer key, and shared secret can be any string, they are not used.
4. The URLs can be any URL, they are not used (e.g. `http://example.com`)
4. The URLs can be any URL, they are not used (e.g. `https://example.com`)
5. Ensure you enable **Create incoming link**
6. Click **Continue**
6. On the next step:

View File

@ -5,11 +5,14 @@ import { Node, YAMLSeq } from "yaml/types";
import { randomBytes } from "crypto";
import { DefaultDisallowedIpRanges } from "matrix-appservice-bridge";
const serverName = "example.com";
const hookshotWebhooksUrl = "https://example.com";
export const DefaultConfig = new BridgeConfig({
bridge: {
domain: "example.com",
domain: serverName,
url: "http://localhost:8008",
mediaUrl: "http://example.com",
mediaUrl: "https://example.com",
port: 9993,
bindAddress: "127.0.0.1",
},
@ -25,7 +28,7 @@ export const DefaultConfig = new BridgeConfig({
timestampFormat: "HH:mm:ss:SSS",
},
permissions: [{
actor: "example.com",
actor: serverName,
services: [{
service: "*",
level: "admin"
@ -33,7 +36,7 @@ export const DefaultConfig = new BridgeConfig({
}],
passFile: "passkey.pem",
widgets: {
publicUrl: "http://example.com/widgetapi/v1/static",
publicUrl: `${hookshotWebhooksUrl}/widgetapi/v1/static`,
addToAdminRooms: false,
roomSetupWidget: {
addOnInvite: false,
@ -64,7 +67,7 @@ export const DefaultConfig = new BridgeConfig({
oauth: {
client_id: "foo",
client_secret: "bar",
redirect_uri: "https://example.com/bridge_oauth/",
redirect_uri: `${hookshotWebhooksUrl}/bridge_oauth/`,
},
webhook: {
secret: "secrettoken",
@ -85,7 +88,7 @@ export const DefaultConfig = new BridgeConfig({
},
webhook: {
secret: "secrettoken",
publicUrl: "https://example.com/hookshot/"
publicUrl: `${hookshotWebhooksUrl}/hookshot/`,
},
userIdPrefix: "_gitlab_",
},
@ -96,19 +99,19 @@ export const DefaultConfig = new BridgeConfig({
oauth: {
client_id: "foo",
client_secret: "bar",
redirect_uri: "https://example.com/bridge_oauth/",
redirect_uri: `${hookshotWebhooksUrl}/bridge_oauth/`,
},
},
generic: {
allowJsTransformationFunctions: false,
enabled: false,
enableHttpGet: false,
urlPrefix: "https://example.com/webhook/",
urlPrefix: `${hookshotWebhooksUrl}/webhook/`,
userIdPrefix: "_webhooks_",
waitForComplete: false,
},
figma: {
publicUrl: "https://example.com/hookshot/",
publicUrl: `${hookshotWebhooksUrl}/hookshot/`,
instances: {
"your-instance": {
teamId: "your-team-id",