mirror of https://github.com/Chocobozzz/PeerTube
open CORS to allow in-browser apps to communicate w/ PeerTube instances
parent
fc0941cbec
commit
1fd2d96ff8
|
@ -84,9 +84,8 @@ import { UpdateVideosScheduler } from './server/lib/schedulers/update-videos-sch
|
|||
|
||||
// ----------- App -----------
|
||||
|
||||
// Enable CORS for develop
|
||||
if (isTestInstance()) {
|
||||
app.use((req, res, next) => {
|
||||
// Enable CORS
|
||||
app.use((req, res, next) => {
|
||||
// These routes have already cors
|
||||
if (
|
||||
req.path.indexOf(STATIC_PATHS.TORRENTS) === -1 &&
|
||||
|
@ -100,8 +99,7 @@ if (isTestInstance()) {
|
|||
}
|
||||
|
||||
return next()
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
// For the logger
|
||||
app.use(morgan('combined', {
|
||||
|
|
Loading…
Reference in New Issue