Aktueller Stand
This commit is contained in:
8
backend/node_modules/@fastify/cors/vary.js
generated
vendored
8
backend/node_modules/@fastify/cors/vary.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
const LRUCache = require('mnemonist/lru-cache')
|
||||
const { FifoMap: FifoCache } = require('toad-cache')
|
||||
|
||||
/**
|
||||
* Field Value Components
|
||||
@@ -42,7 +42,7 @@ function parse (header) {
|
||||
let char
|
||||
|
||||
// tokenize the header
|
||||
for (i = 0; i < il; ++i) {
|
||||
for (i; i < il; ++i) {
|
||||
char = header[i]
|
||||
// when we have whitespace set the pos to the next position
|
||||
if (char === ' ') {
|
||||
@@ -67,7 +67,7 @@ function parse (header) {
|
||||
}
|
||||
|
||||
function createAddFieldnameToVary (fieldname) {
|
||||
const headerCache = new LRUCache(1000)
|
||||
const headerCache = new FifoCache(1000)
|
||||
|
||||
validateFieldname(fieldname)
|
||||
|
||||
@@ -92,7 +92,7 @@ function createAddFieldnameToVary (fieldname) {
|
||||
header = header.join(', ')
|
||||
}
|
||||
|
||||
if (!headerCache.has(header)) {
|
||||
if (headerCache.get(header) === undefined) {
|
||||
const vals = parse(header)
|
||||
|
||||
if (vals.indexOf('*') !== -1) {
|
||||
|
||||
Reference in New Issue
Block a user