mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-04 00:43:04 +00:00
12 lines
276 B
CoffeeScript
12 lines
276 B
CoffeeScript
|
settings = require "settings-sharelatex"
|
||
|
|
||
|
httpProxy = require('http-proxy');
|
||
|
proxy = httpProxy.createProxyServer({
|
||
|
target: settings.apis.realTime.url
|
||
|
ws: true
|
||
|
})
|
||
|
|
||
|
module.exports =
|
||
|
apply: (app) ->
|
||
|
app.all /\/socket\.io\/.*/, (req, res, next) ->
|
||
|
proxy.web req, res, next
|