Skip to content
Snippets Groups Projects
Commit 7e25e710 authored by Alex's avatar Alex
Browse files

chore: set cors config to webpack

parent 322d15b1
No related branches found
No related tags found
No related merge requests found
Pipeline #14166 canceled
FROM theiaide/theia-java:1.3.0
COPY webpack.config.js /home/theia/webpack.config.js
COPY plugins /home/plugins
ENTRYPOINT [ "yarn", "theia", "start", "/home/project", "--hostname=0.0.0.0", "--plugins=local-dir:/home/plugins"]
......
/**
* This file can be edited to customize webpack configuration.
* To reset delete this file and rerun theia build again.
*/
// @ts-check
const config = require('./gen-webpack.config.js');
config.devServer: {
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
}
}
/**
* Expose bundled modules on window.theia.moduleName namespace, e.g.
* window['theia']['@theia/core/lib/common/uri'].
* Such syntax can be used by external code, for instance, for testing.
config.module.rules.push({
test: /\.js$/,
loader: require.resolve('@theia/application-manager/lib/expose-loader')
}); */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment