1
0
Fork 0
mirror of https://github.com/alangrainger/immich-public-proxy.git synced 2024-12-28 03:41:58 +00:00

Merge pull request #24 from Billsong19/bill-add-cors

enable cors
This commit is contained in:
Alan Grainger 2024-11-17 09:05:35 +01:00 committed by GitHub
commit 599eded54c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -17,6 +17,7 @@
"main": "dist/index.js",
"dependencies": {
"archiver": "^7.0.1",
"cors": "^2.8.5",
"dayjs": "^1.11.13",
"dotenv": "^16.4.5",
"ejs": "^3.1.10",

View file

@ -2,6 +2,7 @@ import express from 'express'
import immich from './immich'
import render from './render'
import dayjs from 'dayjs'
import cors from 'cors'
import { AssetType, ImageSize } from './types'
import { decrypt } from './encrypt'
import { log, toString, addResponseHeaders } from './functions'
@ -9,6 +10,8 @@ import { log, toString, addResponseHeaders } from './functions'
require('dotenv').config()
const app = express()
// Enable CORS
app.use(cors())
// Add the EJS view engine, to render the gallery page
app.set('view engine', 'ejs')
// For parsing the password unlock form