fix(config): allow null values in header rules#849
Open
ReinerBRO wants to merge 1 commit intovercel:mainfrom
Open
fix(config): allow null values in header rules#849ReinerBRO wants to merge 1 commit intovercel:mainfrom
ReinerBRO wants to merge 1 commit intovercel:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
supports using to remove a previously defined header value, but rejected such config values before passing config through.
Fixes #438.
Testing
RUN v2.1.3 /Users/h1syu1/PythonProjects/prs2-serve/serve
Coverage enabled with v8
✓ tests/config.test.ts (6 tests) 43ms
Test Files 1 passed (1)
Tests 6 passed (6)
Start at 03:26:55
Duration 493ms (transform 23ms, setup 0ms, collect 46ms, tests 43ms, environment 0ms, prepare 40ms)
% Coverage report from v8
------------------|---------|----------|---------|---------|--------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
------------------|---------|----------|---------|---------|--------------------
All files | 9.72 | 51.21 | 35.71 | 9.72 |
build | 0 | 0 | 0 | 0 |
main.js | 0 | 0 | 0 | 0 | 1-606
config | 0 | 0 | 0 | 0 |
vitest.ts | 0 | 0 | 0 | 0 | 1-16
source | 0 | 50 | 50 | 0 |
main.ts | 0 | 0 | 0 | 0 | 1-163
types.ts | 0 | 0 | 0 | 0 |
source/utilities | 30.56 | 54.05 | 40 | 30.56 |
cli.ts | 0 | 0 | 0 | 0 | 1-207
config.ts | 88.54 | 54.83 | 100 | 88.54 | ...116-121,125-126
http.ts | 0 | 0 | 0 | 0 | 1-43
logger.ts | 72.72 | 100 | 25 | 72.72 | 9,11,15
promise.ts | 100 | 100 | 100 | 100 |
server.ts | 0 | 0 | 0 | 0 | 1-206
------------------|---------|----------|---------|---------|--------------------