mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-28 03:41:58 +00:00
Fix #11 image headers being sent as 'undefined'
This commit is contained in:
parent
80eaffed85
commit
da5930fab1
3 changed files with 8 additions and 9 deletions
13
Dockerfile
13
Dockerfile
|
@ -2,12 +2,15 @@ FROM node:lts-slim
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
COPY app/package.json ./
|
||||
COPY app/ ./
|
||||
|
||||
RUN npm install --omit=dev
|
||||
RUN npm install pm2 -g
|
||||
|
||||
COPY app/ ./
|
||||
RUN chown -R node:node /app
|
||||
|
||||
USER node
|
||||
|
||||
RUN npm install --omit=dev
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
|
@ -15,10 +18,6 @@ ENV NODE_ENV=production
|
|||
# dev-dependencies above to save space in the final build
|
||||
RUN npx tsc --noCheck
|
||||
|
||||
RUN chown -R node:node /app
|
||||
|
||||
USER node
|
||||
|
||||
HEALTHCHECK --interval=30s --start-period=10s --timeout=5s CMD node /app/healthcheck.js || exit 1
|
||||
|
||||
CMD ["pm2-runtime", "dist/index.js" ]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "immich-public-proxy",
|
||||
"version": "1.3.4",
|
||||
"version": "1.3.5",
|
||||
"scripts": {
|
||||
"dev": "ts-node src/index.ts",
|
||||
"build": "npx tsc",
|
||||
|
|
|
@ -17,7 +17,7 @@ class Render {
|
|||
const data = await immich.getAssetBuffer(asset, size)
|
||||
if (data) {
|
||||
for (const header of ['content-type', 'content-length']) {
|
||||
res.set(header, data.headers[header])
|
||||
res.set(header, data.headers.get(header))
|
||||
}
|
||||
res.send(Buffer.from(await data.arrayBuffer()))
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue