Browse Source

Minor cert improvements.

pull/516/head
Sebastian 6 years ago
parent
commit
251fc501b1
  1. 1
      backend/src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs
  2. 5
      backend/src/Squidex/Program.cs
  3. 5
      backend/src/Squidex/appsettings.json
  4. 0
      dev/create-cert.ps1
  5. 0
      dev/install-cert.ps1
  6. 0
      dev/squidex-dev.cer
  7. 0
      dev/squidex-dev.crt
  8. 0
      dev/squidex-dev.pfx
  9. 18
      frontend/app-config/webpack.config.js
  10. 2
      frontend/package.json

1
backend/src/Squidex/Areas/Api/Controllers/Apps/AppLanguagesController.cs

@ -112,6 +112,7 @@ namespace Squidex.Areas.Api.Controllers.Apps
/// <param name="language">The language to delete from the app.</param>
/// <returns>
/// 200 => Language deleted.
/// 400 => Language is master language.
/// 404 => Language or app not found.
/// </returns>
[HttpDelete]

5
backend/src/Squidex/Program.cs

@ -69,10 +69,11 @@ namespace Squidex
{
serverOptions.Listen(
IPAddress.Any,
context.Configuration.GetValue<int>("devMode:port"),
listenOptions => listenOptions.UseHttps("../../../local_certs/squidex-dev.pfx", "password"));
5001,
listenOptions => listenOptions.UseHttps("../../../dev/squidex-dev.pfx", "password"));
}
});
builder.UseStartup<Startup>();
});
}

5
backend/src/Squidex/appsettings.json

@ -1,9 +1,4 @@
{
"devMode": {
"enable": false,
"port": 5001
},
"mode": {
/*
* Use this flag to set Squidex to readonly, e.g. when you deploy a second instance for migration.

0
local_certs/create-cert.ps1 → dev/create-cert.ps1

0
local_certs/install-cert.ps1 → dev/install-cert.ps1

0
local_certs/squidex-dev.cer → dev/squidex-dev.cer

0
local_certs/squidex-dev.crt → dev/squidex-dev.crt

0
local_certs/squidex-dev.pfx → dev/squidex-dev.pfx

18
frontend/app-config/webpack.config.js

@ -10,14 +10,6 @@ function root() {
return path.join.apply(path, [appRoot].concat(newArgs));
};
function tryGetFile(file) {
try {
return fs.readFileSync(path.resolve(__dirname, file));
} catch (ex) {
return undefined;
}
}
const plugins = {
// https://github.com/webpack-contrib/mini-css-extract-plugin
MiniCssExtractPlugin: require('mini-css-extract-plugin'),
@ -218,10 +210,6 @@ module.exports = function (env) {
headers: {
'Access-Control-Allow-Origin': '*'
},
https: {
key: tryGetFile('localhost-key.pem'),
cert: tryGetFile('localhost.pem'),
},
historyApiFallback: true,
}
};
@ -284,7 +272,11 @@ module.exports = function (env) {
config.plugins.push(
new plugins.HtmlWebpackPlugin({
template: 'app/_theme.html', hash: true, chunksSortMode: 'none', filename: 'theme.html'
filename: 'theme.html',
hash: true,
chunks: [],
chunksSortMode: 'none',
template: 'app/_theme.html'
})
);

2
frontend/package.json

@ -5,7 +5,7 @@
"license": "MIT",
"repository": "https://github.com/SebastianStehle/Squidex",
"scripts": {
"start": "webpack-dev-server --config app-config/webpack.config.js --inline --port 3000 --hot --https --pfx ../local_certs/squidex-dev.pfx --pfx-passphrase password",
"start": "webpack-dev-server --config app-config/webpack.config.js --inline --port 3000 --hot --https --pfx ../dev/squidex-dev.pfx --pfx-passphrase password",
"test": "karma start",
"test:coverage": "karma start karma.coverage.conf.js",
"test:clean": "rimraf _test-output",

Loading…
Cancel
Save