mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 12:26:47 +01:00
chore(server) Increase cache-control time (#1189)
* chore(server) Increase cache-control time * Update version for openapi
This commit is contained in:
parent
2d326f47ec
commit
fdf51a8855
3 changed files with 5 additions and 3 deletions
|
@ -110,7 +110,7 @@ export class AssetController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('/file/:assetId')
|
@Get('/file/:assetId')
|
||||||
@Header('Cache-Control', 'max-age=3600')
|
@Header('Cache-Control', 'max-age=31536000')
|
||||||
async serveFile(
|
async serveFile(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Headers() headers: Record<string, string>,
|
@Headers() headers: Record<string, string>,
|
||||||
|
@ -123,7 +123,7 @@ export class AssetController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('/thumbnail/:assetId')
|
@Get('/thumbnail/:assetId')
|
||||||
@Header('Cache-Control', 'max-age=3600')
|
@Header('Cache-Control', 'max-age=31536000')
|
||||||
async getAssetThumbnail(
|
async getAssetThumbnail(
|
||||||
@GetAuthUser() authUser: AuthUserDto,
|
@GetAuthUser() authUser: AuthUserDto,
|
||||||
@Headers() headers: Record<string, string>,
|
@Headers() headers: Record<string, string>,
|
||||||
|
|
|
@ -13,6 +13,7 @@ import {
|
||||||
Response,
|
Response,
|
||||||
ParseBoolPipe,
|
ParseBoolPipe,
|
||||||
StreamableFile,
|
StreamableFile,
|
||||||
|
Header,
|
||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { UserService } from './user.service';
|
import { UserService } from './user.service';
|
||||||
import { Authenticated } from '../../decorators/authenticated.decorator';
|
import { Authenticated } from '../../decorators/authenticated.decorator';
|
||||||
|
@ -111,6 +112,7 @@ export class UserController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get('/profile-image/:userId')
|
@Get('/profile-image/:userId')
|
||||||
|
@Header('Cache-Control', 'max-age=86400')
|
||||||
async getProfileImage(@Param('userId') userId: string, @Response({ passthrough: true }) res: Res): Promise<any> {
|
async getProfileImage(@Param('userId') userId: string, @Response({ passthrough: true }) res: Res): Promise<any> {
|
||||||
const readableStream = await this.userService.getUserProfileImage(userId);
|
const readableStream = await this.userService.getUserProfileImage(userId);
|
||||||
res.set({
|
res.set({
|
||||||
|
|
|
@ -2288,7 +2288,7 @@
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Immich",
|
"title": "Immich",
|
||||||
"description": "Immich API",
|
"description": "Immich API",
|
||||||
"version": "1.39.0",
|
"version": "1.40.0",
|
||||||
"contact": {}
|
"contact": {}
|
||||||
},
|
},
|
||||||
"tags": [],
|
"tags": [],
|
||||||
|
|
Loading…
Reference in a new issue