add MATRIX_PROTOCOL option
This commit is contained in:
parent
7d0d29bb8b
commit
95eb80d6da
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import sendMessage from "../../impl";
|
|||
|
||||
const router = express.Router();
|
||||
|
||||
const matrixProtocol = process.env.MATRIX_PROTOCOL ? process.env.MATRIX_PROTOCOL : "http";
|
||||
const matrixHomeserverBaseUrl = process.env.MATRIX_HOMESERVER_BASE_URL ? process.env.MATRIX_HOMESERVER_BASE_URL : "localhost:3000";
|
||||
const matrixWaffleAppUrl = process.env.MATRIX_WAFFLE_APP_URL ? process.env.MATRIX_WAFFLE_APP_URL : "localhost:3000";
|
||||
const matrixDeviceId = "xyz.hippoz.waffle.generic_matrix_client.device";
|
||||
|
@ -155,7 +156,7 @@ router.use((_req, res, next) => {
|
|||
router.get("/.well-known/matrix/client", (req, res) => {
|
||||
res.json({
|
||||
"m.homeserver": {
|
||||
"base_url": `http://${matrixHomeserverBaseUrl}`
|
||||
"base_url": `${matrixProtocol}://${matrixHomeserverBaseUrl}`
|
||||
},
|
||||
"xyz.hippoz.waffle": {
|
||||
"app_url": matrixWaffleAppUrl
|
||||
|
|
Loading…
Reference in a new issue