mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-28 03:41:58 +00:00
enable cors
This commit is contained in:
parent
93a29e0efc
commit
b5fdec50a8
2 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"archiver": "^7.0.1",
|
"archiver": "^7.0.1",
|
||||||
|
"cors": "^2.8.5",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"ejs": "^3.1.10",
|
"ejs": "^3.1.10",
|
||||||
|
|
|
@ -2,6 +2,7 @@ import express from 'express'
|
||||||
import immich from './immich'
|
import immich from './immich'
|
||||||
import render from './render'
|
import render from './render'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
import cors from 'cors'
|
||||||
import { AssetType, ImageSize } from './types'
|
import { AssetType, ImageSize } from './types'
|
||||||
import { decrypt } from './encrypt'
|
import { decrypt } from './encrypt'
|
||||||
import { log, toString, addResponseHeaders } from './functions'
|
import { log, toString, addResponseHeaders } from './functions'
|
||||||
|
@ -9,6 +10,8 @@ import { log, toString, addResponseHeaders } from './functions'
|
||||||
require('dotenv').config()
|
require('dotenv').config()
|
||||||
|
|
||||||
const app = express()
|
const app = express()
|
||||||
|
// Enable CORS
|
||||||
|
app.use(cors())
|
||||||
// Add the EJS view engine, to render the gallery page
|
// Add the EJS view engine, to render the gallery page
|
||||||
app.set('view engine', 'ejs')
|
app.set('view engine', 'ejs')
|
||||||
// For parsing the password unlock form
|
// For parsing the password unlock form
|
||||||
|
|
Loading…
Reference in a new issue