Page MenuHomePhabricator

D5846.id19347.diff
No OneTemporary

D5846.id19347.diff

diff --git a/keyserver/src/database/migration-config.js b/keyserver/src/database/migration-config.js
--- a/keyserver/src/database/migration-config.js
+++ b/keyserver/src/database/migration-config.js
@@ -117,6 +117,14 @@
`);
},
],
+ [
+ 12,
+ async () => {
+ moveToNonApacheConfig('facts/squadcal_url.json', '/');
+ moveToNonApacheConfig('facts/commapp_url.json', '/comm/');
+ moveToNonApacheConfig('facts/landing.json', '/commlanding/');
+ },
+ ],
]);
const newDatabaseVersion: number = Math.max(...migrations.keys());
@@ -175,4 +183,22 @@
await writeFile.close();
}
+async function moveToNonApacheConfig(
+ filePath: string,
+ routePath: string,
+): Promise<void> {
+ // Since the non-apache config is so opionated, just write expected config
+ const newJSON = {
+ baseDomain: 'http://localhost:3000',
+ basePath: routePath,
+ baseRoutePath: routePath,
+ https: false,
+ proxy: 'none',
+ };
+ console.warn(`updating ${filePath} to ${JSON.stringify(newJSON)}`);
+ const writeFile = await fs.promises.open(filePath, 'w');
+ await writeFile.writeFile(JSON.stringify(newJSON, null, ' '), 'utf8');
+ await writeFile.close();
+}
+
export { migrations, newDatabaseVersion };
diff --git a/native/utils/url-utils.js b/native/utils/url-utils.js
--- a/native/utils/url-utils.js
+++ b/native/utils/url-utils.js
@@ -26,11 +26,11 @@
}
function getDevNodeServerURLFromHostname(hostname: string): string {
- return `http://${hostname}/comm`;
+ return `http://${hostname}:3000/comm`;
}
function getDevLandingURLFromHostname(hostname: string): string {
- return `http://${hostname}/commlanding`;
+ return `http://${hostname}:3000/commlanding`;
}
function getDevNodeServerURL(): string {

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 2:07 AM (19 h, 46 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2693171
Default Alt Text
D5846.id19347.diff (1 KB)

Event Timeline