fix: CORS not same origin
This commit is contained in:
@@ -9,6 +9,7 @@ COPY src /app/src
|
||||
COPY package.json /app
|
||||
COPY dotenv /app/.env
|
||||
|
||||
RUN apk add bash bash-completion vim
|
||||
RUN npm install --include=dev
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
@@ -45,7 +45,9 @@ app.use((req, res, next) => {
|
||||
app.use(bodyParser.urlencoded({ extended: true, limit: '50mb' }));
|
||||
app.use(bodyParser.json({ limit: '50mb' }));
|
||||
app.use(morgan('dev'));
|
||||
app.use(helmet());
|
||||
app.use(helmet({
|
||||
crossOriginResourcePolicy: false
|
||||
}));
|
||||
app.use(compression());
|
||||
app.use(cors({
|
||||
origin: '*',
|
||||
|
||||
Reference in New Issue
Block a user