summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/ServerService.ts
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2026-03-02 16:05:12 -0500
committerFreya Murphy <freya@freyacat.org>2026-03-02 18:39:22 -0500
commit24734d408700a72d45c3ff4a679606cab3ec544f (patch)
treed0fee0bcf508f3c631f7c26724bb5cd94dfc88a0 /packages/backend/src/server/ServerService.ts
parentmerge: Release/2025.4.5 (!1258) (diff)
downloadsharkey-24734d408700a72d45c3ff4a679606cab3ec544f.tar.gz
sharkey-24734d408700a72d45c3ff4a679606cab3ec544f.tar.bz2
sharkey-24734d408700a72d45c3ff4a679606cab3ec544f.zip
split url into webUrl and localUrl (like mastodon)stable
Diffstat (limited to 'packages/backend/src/server/ServerService.ts')
-rw-r--r--packages/backend/src/server/ServerService.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/backend/src/server/ServerService.ts b/packages/backend/src/server/ServerService.ts
index 77b4519570..0d8fc9adbe 100644
--- a/packages/backend/src/server/ServerService.ts
+++ b/packages/backend/src/server/ServerService.ts
@@ -85,7 +85,7 @@ export class ServerService implements OnApplicationShutdown {
// HSTS
// 6months (15552000sec)
- if (this.config.url.startsWith('https') && !this.config.disableHsts) {
+ if (this.config.webUrl.startsWith('https') && !this.config.disableHsts) {
fastify.addHook('onRequest', (request, reply, done) => {
reply.header('strict-transport-security', 'max-age=15552000; preload');
done();
@@ -126,7 +126,7 @@ export class ServerService implements OnApplicationShutdown {
}
const effectiveLocation = process.env.NODE_ENV === 'production' ? location : location.replace(/^http:\/\//, 'https://');
- if (effectiveLocation.startsWith(`https://${this.config.host}/`)) {
+ if (effectiveLocation.startsWith(`https://${this.config.webHost}/`)) {
done();
return;
}
@@ -216,7 +216,7 @@ export class ServerService implements OnApplicationShutdown {
const user = await this.usersRepository.findOne({
where: {
usernameLower: username.toLowerCase(),
- host: (host == null) || (host === this.config.host) ? IsNull() : host,
+ host: (host == null) || (host === this.config.localHost) ? IsNull() : host,
isSuspended: false,
},
});