Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: netlify/netlify-ipx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.4.2
Choose a base ref
...
head repository: netlify/netlify-ipx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.4.3
Choose a head ref
  • 4 commits
  • 5 files changed
  • 4 contributors

Commits on Aug 3, 2023

  1. chore(deps): bump semver from 5.7.1 to 5.7.2 (#173)

    Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
    - [Release notes](https://github.com/npm/node-semver/releases)
    - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
    - [Commits](npm/node-semver@v5.7.1...v5.7.2)
    
    ---
    updated-dependencies:
    - dependency-name: semver
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 3, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0b32695 View commit details

Commits on Aug 10, 2023

  1. fix(deps): update dependency mkdirp to v3 (#162)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Aug 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d946c42 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    978f4c8 View commit details
  3. chore(main): release 1.4.3 (#182)

    Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
    token-generator-app[bot] authored Aug 10, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    21451a0 View commit details
Showing with 31 additions and 37 deletions.
  1. +8 −0 CHANGELOG.md
  2. +2 −2 package.json
  3. +1 −1 src/index.ts
  4. +5 −5 test/index.test.ts
  5. +15 −29 yarn.lock
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.4.3](https://github.com/netlify/netlify-ipx/compare/v1.4.2...v1.4.3) (2023-08-10)


### Bug Fixes

* casing now matches what comes in a Netlify function via event.headers ([#181](https://github.com/netlify/netlify-ipx/issues/181)) ([978f4c8](https://github.com/netlify/netlify-ipx/commit/978f4c868e06d8f4df1a1651ebecf1cffeeb4bba))
* **deps:** update dependency mkdirp to v3 ([#162](https://github.com/netlify/netlify-ipx/issues/162)) ([d946c42](https://github.com/netlify/netlify-ipx/commit/d946c427f2f33aad52cfe956217831400ffc66db))

## [1.4.2](https://github.com/netlify/netlify-ipx/compare/v1.4.1...v1.4.2) (2023-08-03)


4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netlify/ipx",
"version": "1.4.2",
"version": "1.4.3",
"description": "on-demand image optimization for Netlify",
"repository": "netlify/netlify-ipx",
"license": "MIT",
@@ -22,7 +22,7 @@
"fs-extra": "^11.0.0",
"ipx": "^1.0.0",
"micromatch": "^4.0.5",
"mkdirp": "^1.0.4",
"mkdirp": "^3.0.0",
"murmurhash": "^2.0.0",
"node-fetch": "^2.0.0",
"ufo": "^1.0.0",
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import { loadSourceImage as defaultLoadSourceImage } from './http'
import { decodeBase64Params, doPatternsMatchUrl, RemotePattern } from './utils'

// WAF is Web Application Firewall
const WAF_BYPASS_TOKEN_HEADER = 'X-Nf-Waf-Bypass-Token'
const WAF_BYPASS_TOKEN_HEADER = 'x-nf-waf-bypass-token'

export interface IPXHandlerOptions extends Partial<IPXOptions> {
/**
10 changes: 5 additions & 5 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ test('should add WAF headers to local images being transformed', async (t) => {
cacheDir: '/tmp/ipx-cache',
bypassDomainCheck: true
}, (sourceImageOptions) => {
t.assert(sourceImageOptions.requestHeaders && sourceImageOptions.requestHeaders['X-Nf-Waf-Bypass-Token'] === 'some token')
t.assert(sourceImageOptions.requestHeaders && sourceImageOptions.requestHeaders['x-nf-waf-bypass-token'] === 'some token')

return Promise.resolve({ finalize: () => { } } as SourceImageResult)
})
@@ -116,7 +116,7 @@ test('should add WAF headers to local images being transformed', async (t) => {
{
rawUrl: 'http://localhost:3000/some-path',
path: '/_ipx/w_500/no-file.jpg',
headers: { 'X-Nf-Waf-Bypass-Token': 'some token' },
headers: { 'x-nf-waf-bypass-token': 'some token' },
rawQuery: '',
httpMethod: 'GET',
queryStringParameters: {},
@@ -135,7 +135,7 @@ test('should not add WAF headers to remote images being transformed', async (t)
cacheDir: '/tmp/ipx-cache',
bypassDomainCheck: true
}, (sourceImageOptions) => {
t.assert(sourceImageOptions.requestHeaders && sourceImageOptions.requestHeaders['X-Nf-Waf-Bypass-Token'] === undefined)
t.assert(sourceImageOptions.requestHeaders && sourceImageOptions.requestHeaders['x-nf-waf-bypass-token'] === undefined)

return Promise.resolve({ finalize: () => { } } as SourceImageResult)
})
@@ -144,7 +144,7 @@ test('should not add WAF headers to remote images being transformed', async (t)
{
rawUrl: 'http://localhost:3000/some-path',
path: '/_ipx/w_500/https%3A%2F%2Fsome-site.com%2Fno-file.jpg',
headers: { 'X-Nf-Waf-Bypass-Token': 'some token' },
headers: { 'x-nf-waf-bypass-token': 'some token' },
rawQuery: '',
httpMethod: 'GET',
queryStringParameters: {},
@@ -162,7 +162,7 @@ test('should not add WAF headers to local images if WAF is disabled', async (t)
cacheDir: '/tmp/ipx-cache',
bypassDomainCheck: true
}, (sourceImageOptions) => {
t.assert(sourceImageOptions.requestHeaders && sourceImageOptions.requestHeaders['X-Nf-Waf-Bypass-Token'] === undefined)
t.assert(sourceImageOptions.requestHeaders && sourceImageOptions.requestHeaders['x-nf-waf-bypass-token'] === undefined)

return Promise.resolve({ finalize: () => { } } as SourceImageResult)
})
44 changes: 15 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -2511,10 +2511,10 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3:
resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113"
integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==

mkdirp@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
mkdirp@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50"
integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==

mri@^1.2.0:
version "1.2.0"
@@ -3073,33 +3073,19 @@ safe-regex@^2.1.1:
regexp-tree "~0.1.1"

"semver@2 || 3 || 4 || 5":
version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
version "5.7.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==

semver@^6.1.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==

semver@^7.0.0, semver@^7.3.6, semver@^7.3.7, semver@^7.3.8:
version "7.3.8"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
dependencies:
lru-cache "^6.0.0"

semver@^7.3.2:
version "7.5.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.2.tgz#5b851e66d1be07c1cdaf37dfc856f543325a2beb"
integrity sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==
dependencies:
lru-cache "^6.0.0"

semver@^7.3.5, semver@^7.5.0:
version "7.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec"
integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==
version "6.3.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==

semver@^7.0.0, semver@^7.3.2, semver@^7.3.5, semver@^7.3.6, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0:
version "7.5.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e"
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==
dependencies:
lru-cache "^6.0.0"