Commit 575723b0 authored by rockyl's avatar rockyl

修改curse命名错误

parent c04f01a9
...@@ -12,12 +12,19 @@ const https = require('https'); ...@@ -12,12 +12,19 @@ const https = require('https');
let publicPath; let publicPath;
function handler(request, response){ function handler(request, response) {
return serveHandler(request, response, { return serveHandler(request, response, {
public: publicPath, public: publicPath,
headers: { headers: [
'Access-Control-Allow-Origin': '*', {
} source: '**/*',
headers: [
{
key: 'Access-Control-Allow-Origin', value: '*',
}
]
}
]
}); });
} }
...@@ -28,11 +35,11 @@ exports.start = function (options) { ...@@ -28,11 +35,11 @@ exports.start = function (options) {
publicPath = path.resolve(folder); publicPath = path.resolve(folder);
if (fs.existsSync(publicPath)) { if (fs.existsSync(publicPath)) {
let sslOpts; let sslOpts;
if(keyFile && certFile){ if (keyFile && certFile) {
const keyContent = fs.readFileSync(keyFile, 'utf8'), const keyContent = fs.readFileSync(keyFile, 'utf8'),
certContent = fs.readFileSync(certFile, 'utf8'); certContent = fs.readFileSync(certFile, 'utf8');
if(keyContent && certContent){ if (keyContent && certContent) {
sslOpts = { sslOpts = {
key: keyContent, key: keyContent,
cert: certContent cert: certContent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment