mirror of
https://github.com/IrosTheBeggar/mStream.git
synced 2025-10-27 07:31:02 +00:00
notes
This commit is contained in:
parent
e6e6752260
commit
5213e86ab3
@ -247,7 +247,9 @@ exports.setup = (mstream) => {
|
||||
|
||||
mstream.get('/api/v1/syncthing-proxy/*', (req, res) => {
|
||||
try {
|
||||
// Add the auth token as a cookie so all contents of the iframe use it
|
||||
res.cookie('x-access-token', req.token);
|
||||
// TODO: This can crash the program if the target is incorrect
|
||||
apiProxy.web(req, res, {target: 'http://' + sync.getUiAddress()});
|
||||
} catch (err) {
|
||||
winston.error('Syncthing Proxy Error', { stack: err });
|
||||
@ -257,6 +259,7 @@ exports.setup = (mstream) => {
|
||||
|
||||
mstream.get('/api/v1/syncthing-proxy/', (req, res) => {
|
||||
try {
|
||||
// Add the auth token as a cookie so all contents of the iframe use it
|
||||
res.cookie('x-access-token', req.token);
|
||||
apiProxy.web(req, res, {target: 'http://' + sync.getUiAddress()});
|
||||
} catch (err) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user