Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 6acac0d

Browse files
authored
Merge pull request #149 from gabe565/fix-reverse-proxy
Fix audio not playing over a reverse proxy
2 parents 44790af + f4b4a1c commit 6acac0d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client/src/components/PlayButton/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function PlayButton({timestamp, url}) {
3434
return (
3535
<div>
3636
<Sound
37-
url={url ? url : `http://${ip}:${port}/server/audio?v=${timestamp}`}
37+
url={url ? url : `/server/audio?v=${timestamp}`}
3838
onFinishedPlaying={() => PlayStop()}
3939
playStatus={status}
4040
/>
@@ -48,4 +48,4 @@ function PlayButton({timestamp, url}) {
4848
)
4949
}
5050

51-
export default PlayButton;
51+
export default PlayButton;

relay/routes/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ router.post('/assistant', async(req, res) => {
8181
conversation
8282
.on('audio-data',async(data) => {
8383
fileStream.write(data);
84-
response.audio = `http://${ip.address()}:${port}/server/audio?v=${timestamp}`
84+
response.audio = `/server/audio?v=${timestamp}`
8585
})
8686
.on('response', (text) => {
8787
response.response = text;

0 commit comments

Comments
 (0)