diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2225217..633921c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,16 +15,14 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up Node.js 20 + - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' - cache-dependency-path: './src/package-lock.json' + node-version: 22 - name: Install dependencies working-directory: ./src - run: npm install + run: npm install --no-audit --no-fund - name: Run test suite working-directory: ./src diff --git a/README.md b/README.md index 49109fa..ab6abbf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Google CDN Image Optimizer +[![CI](https://github.com/CDN-guy/google-cdn-image-optimization/actions/workflows/ci.yml/badge.svg)](https://github.com/CDN-guy/google-cdn-image-optimization/actions/workflows/ci.yml) +[![Node.js 20+](https://img.shields.io/badge/node-20+-green.svg)](https://nodejs.org/) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) + ## Overview A high-performance, containerized image transformation service built on **Sharp**. It provides dynamic on-the-fly image resizing, format conversion, and compression optimized for **Google Cloud CDN** and **Google Media CDN**. diff --git a/src/index.js b/src/index.js index 1896884..cf8a7b9 100644 --- a/src/index.js +++ b/src/index.js @@ -401,9 +401,9 @@ app.get('/images/*path', cache(), async (req, res, next) => { }); // please comment this section before upload to Cloud Run -app.get('/original/*origin_path', async (req, res) => { - res.sendFile(`${__dirname}${req.path.replace("original", "images")}`); -}); +// app.get('/original/*origin_path', async (req, res) => { +// res.sendFile(`${__dirname}${req.path.replace("original", "images")}`); +// }); // block any request not coming with /images/ app.get('/*others', async (req, res) => {