File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,7 @@ import { HasuraAction } from "../hasura/hasura.controller";
1414
1515@Controller ( "file-manager" )
1616export class FileManagerController {
17- constructor (
18- private readonly fileManagerService : FileManagerService ,
19- ) { }
17+ constructor ( private readonly fileManagerService : FileManagerService ) { }
2018
2119 @HasuraAction ( )
2220 async listServerFiles ( data : {
Original file line number Diff line number Diff line change @@ -70,13 +70,23 @@ async function bootstrap() {
7070
7171 const appConfig = configService . get < AppConfig > ( "app" ) ;
7272
73+ const allowedOrigins = [
74+ appConfig . webDomain ,
75+ appConfig . apiDomain ,
76+ appConfig . relayDomain ,
77+ appConfig . demosDomain ,
78+ appConfig . wsDomain ,
79+ ] ;
80+
7381 if ( process . env . DEV ) {
74- app . enableCors ( {
75- origin : [ "http://localhost:3000" , "http://0.0.0.0:3000" ] ,
76- credentials : true ,
77- } ) ;
82+ allowedOrigins . push ( "http://localhost:3000" , "http://0.0.0.0:3000" ) ;
7883 }
7984
85+ app . enableCors ( {
86+ origin : allowedOrigins ,
87+ credentials : true ,
88+ } ) ;
89+
8090 app . use (
8191 session ( {
8292 rolling : true ,
You can’t perform that action at this time.
0 commit comments