mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-02 18:14:56 +02:00
remove secure_cookies option from config
This commit is contained in:
parent
f5e894e06a
commit
f40d91ff9e
8 changed files with 12 additions and 141 deletions
|
@ -27,14 +27,16 @@ export default async function migration() {
|
|||
const fileContents = fs.readFileSync(filePath, "utf8");
|
||||
rawConfig = yaml.load(fileContents);
|
||||
|
||||
rawConfig.server.secure_cookies = true;
|
||||
delete rawConfig.server.secure_cookies;
|
||||
|
||||
// Write the updated YAML back to the file
|
||||
const updatedYaml = yaml.dump(rawConfig);
|
||||
fs.writeFileSync(filePath, updatedYaml, "utf8");
|
||||
|
||||
console.log(`Removed deprecated config option: secure_cookies.`);
|
||||
} catch (e) {
|
||||
console.log(
|
||||
`Failed to set secure_cookies to true in config. Please set it manually. https://docs.fossorial.io/Pangolin/Configuration/config`
|
||||
`Was unable to remove deprecated config option: secure_cookies. Error: ${e}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue