1
0
Fork 0
mirror of https://github.com/alangrainger/immich-public-proxy.git synced 2024-12-29 12:21:57 +00:00

Add CORS header to default config

This commit is contained in:
Alan Grainger 2024-11-17 08:43:27 +01:00
parent 93a29e0efc
commit e3a60ec9df
3 changed files with 4 additions and 2 deletions

View file

@ -1,7 +1,8 @@
{ {
"ipp": { "ipp": {
"responseHeaders": { "responseHeaders": {
"Cache-Control": "public, max-age=2592000" "Cache-Control": "public, max-age=2592000",
"Access-Control-Allow-Origin": "*"
}, },
"singleImageGallery": false, "singleImageGallery": false,
"singleItemAutoOpen": true, "singleItemAutoOpen": true,

View file

@ -1,6 +1,6 @@
{ {
"name": "immich-public-proxy", "name": "immich-public-proxy",
"version": "1.4.5", "version": "1.4.6",
"scripts": { "scripts": {
"dev": "ts-node src/index.ts", "dev": "ts-node src/index.ts",
"build": "npx tsc", "build": "npx tsc",

View file

@ -117,6 +117,7 @@ app.get('/healthcheck', async (_req, res) => {
* reverse proxy config, or even redirect to 404 if you like. * reverse proxy config, or even redirect to 404 if you like.
*/ */
app.get('/', (_req, res) => { app.get('/', (_req, res) => {
addResponseHeaders(res)
res.render('home') res.render('home')
}) })