mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-29 14:18:26 +02:00
Adjust const one more time
This commit is contained in:
parent
8bcb2b3b0f
commit
5d34bd82c0
13 changed files with 13 additions and 26 deletions
|
@ -37,8 +37,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
if (rawConfig.server?.trust_proxy) {
|
if (rawConfig.server?.trust_proxy) {
|
||||||
rawConfig.server.trust_proxy = 1;
|
rawConfig.server.trust_proxy = 1;
|
||||||
|
|
|
@ -24,8 +24,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
delete rawConfig.server.secure_cookies;
|
delete rawConfig.server.secure_cookies;
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
if (!rawConfig.flags) {
|
if (!rawConfig.flags) {
|
||||||
rawConfig.flags = {};
|
rawConfig.flags = {};
|
||||||
|
|
|
@ -31,8 +31,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
const baseDomain = rawConfig.app.base_domain;
|
const baseDomain = rawConfig.app.base_domain;
|
||||||
const certResolver = rawConfig.traefik.cert_resolver;
|
const certResolver = rawConfig.traefik.cert_resolver;
|
||||||
|
|
|
@ -23,8 +23,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
// Validate the structure
|
// Validate the structure
|
||||||
if (!rawConfig.app || !rawConfig.app.base_url) {
|
if (!rawConfig.app || !rawConfig.app.base_url) {
|
||||||
|
|
|
@ -23,8 +23,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
// Validate the structure
|
// Validate the structure
|
||||||
if (!rawConfig.gerbil) {
|
if (!rawConfig.gerbil) {
|
||||||
|
|
|
@ -26,8 +26,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
// Validate the structure
|
// Validate the structure
|
||||||
if (!rawConfig.server) {
|
if (!rawConfig.server) {
|
||||||
|
|
|
@ -24,8 +24,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
// Validate the structure
|
// Validate the structure
|
||||||
if (!rawConfig.server) {
|
if (!rawConfig.server) {
|
||||||
|
|
|
@ -59,8 +59,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
rawConfig.server.resource_session_request_param =
|
rawConfig.server.resource_session_request_param =
|
||||||
"p_session_request";
|
"p_session_request";
|
||||||
|
|
|
@ -44,8 +44,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
if (!rawConfig.flags) {
|
if (!rawConfig.flags) {
|
||||||
rawConfig.flags = {};
|
rawConfig.flags = {};
|
||||||
|
|
|
@ -177,8 +177,7 @@ export default async function migration() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
if (!rawConfig.server.secret) {
|
if (!rawConfig.server.secret) {
|
||||||
rawConfig.server.secret = generateIdFromEntropySize(32);
|
rawConfig.server.secret = generateIdFromEntropySize(32);
|
||||||
|
|
|
@ -45,8 +45,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
if (rawConfig.cors?.headers) {
|
if (rawConfig.cors?.headers) {
|
||||||
const headers = JSON.parse(
|
const headers = JSON.parse(
|
||||||
|
|
|
@ -46,8 +46,7 @@ export default async function migration() {
|
||||||
|
|
||||||
// Read and parse the YAML file
|
// Read and parse the YAML file
|
||||||
const fileContents = fs.readFileSync(filePath, "utf8");
|
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||||
const rawConfig: any;
|
const rawConfig = yaml.load(fileContents) as any;
|
||||||
rawConfig = yaml.load(fileContents);
|
|
||||||
|
|
||||||
if (rawConfig.server?.trust_proxy) {
|
if (rawConfig.server?.trust_proxy) {
|
||||||
rawConfig.server.trust_proxy = 1;
|
rawConfig.server.trust_proxy = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue