mirror of
https://github.com/docmost/docmost.git
synced 2025-11-19 16:11:13 +10:00
refactor: switch to HttpOnly cookie (#660)
* Switch to httpOnly cookie * create endpoint to retrieve temporary collaboration token * cleanups
This commit is contained in:
@ -16,6 +16,16 @@ export class EnvironmentService {
|
||||
);
|
||||
}
|
||||
|
||||
isHttps(): boolean {
|
||||
const appUrl = this.configService.get<string>('APP_URL');
|
||||
try {
|
||||
const url = new URL(appUrl);
|
||||
return url.protocol === 'https:';
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
getPort(): number {
|
||||
return parseInt(this.configService.get<string>('PORT', '3000'));
|
||||
}
|
||||
@ -44,7 +54,6 @@ export class EnvironmentService {
|
||||
}
|
||||
|
||||
getFileUploadSizeLimit(): string {
|
||||
|
||||
return this.configService.get<string>('FILE_UPLOAD_SIZE_LIMIT', '50mb');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user