Revert getProsodyDomain. Broken when not on localhot.
This commit is contained in:
parent
5650d6aed8
commit
fec219a909
@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## v2.1.2
|
||||
|
||||
* Fix: revert 2.1.1, and revert using the real domain for prosody
|
||||
|
||||
## v2.1.1
|
||||
|
||||
### Fixes
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "peertube-plugin-livechat",
|
||||
"description": "PeerTube plugin livechat",
|
||||
"version": "2.1.1",
|
||||
"version": "2.1.2",
|
||||
"author": "John Livingston",
|
||||
"bugs": "https://github.com/JohnXLivingston/peertube-plugin-livechat/issues",
|
||||
"clientScripts": [
|
||||
|
@ -1,10 +1,12 @@
|
||||
async function getProsodyDomain (options: RegisterServerOptions): Promise<string> {
|
||||
const url = options.peertubeHelpers.config.getWebserverUrl()
|
||||
const matches = url.match(/^https?:\/\/([^:/]*)(:\d+)?(\/|$)/)
|
||||
if (!matches) {
|
||||
throw new Error(`Cant get a domain name from url '${url}'`)
|
||||
}
|
||||
return matches[1]
|
||||
return 'localhost'
|
||||
// FIXME: there is something that is not working with this configuration.
|
||||
// const url = options.peertubeHelpers.config.getWebserverUrl()
|
||||
// const matches = url.match(/^https?:\/\/([^:/]*)(:\d+)?(\/|$)/)
|
||||
// if (!matches) {
|
||||
// throw new Error(`Cant get a domain name from url '${url}'`)
|
||||
// }
|
||||
// return matches[1]
|
||||
}
|
||||
|
||||
export {
|
||||
|
@ -115,7 +115,7 @@ function changeHttpBindRoute ({ peertubeHelpers }: RegisterServerOptions, port:
|
||||
proxyReqPathResolver: async (_req: Request): Promise<string> => {
|
||||
return '/http-bind' // should not be able to access anything else
|
||||
},
|
||||
preserveHostHdr: true,
|
||||
// preserveHostHdr: true,
|
||||
parseReqBody: true // Note that setting this to false overrides reqAsBuffer and reqBodyEncoding below.
|
||||
// FIXME: should we remove cookies?
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user