CARVIEW |
Select Language
HTTP/2 200
date: Fri, 10 Oct 2025 18:49:57 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/karma-runner/karma.git
etag: W/"45ece8b718b4b20cdf1c240148604c0c"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=P244ymiuFMGQzmb4wbFB1mQ8O3SCy34Hy4UEWuAiZKBa3ZWytS913SRd5YnRyt9DfpEJLeEwjmEYC2MlxnwJ6QpCsFqYpCHTiiC7GfRkCU%2F7YFFQi9igb%2BrvXwPtp0XJh9ZX12ccqQyi53Q%2BO9jbJynueysVV8JyZwTWkSvWcifTwbtxmm7p%2BlDaGC5jpE6qlwfY%2FOwhVj%2Brb9EQ3dcpDzpSCA7zSmfYSa1RCpzmkIEvqxiSajqGXg%2FJaA80CWf2p%2F%2Fj8ZdBULMID6IW%2BsUM3Q%3D%3D--mcreyxus%2BJ7DH%2F2m--z65PWA9bo84JHxKitPWdTg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1421557988.1760122196; Path=/; Domain=github.com; Expires=Sat, 10 Oct 2026 18:49:56 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sat, 10 Oct 2026 18:49:56 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: DF22:F5D11:21943:2B919:68E95554
fix(middleware): simplify stripHost. (#3115) · karma-runner/karma@d65e911 · GitHub
Copy file name to clipboard
Copy file name to clipboard
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit d65e911
authored
fix(middleware): simplify stripHost. (#3115)
The stripHost middleware only adds a modified url to the request.
That modified url is only used one place. By converting the middleware
to a module, the code is simpler and beforeMiddleware modules can reuse
karma middleware. (One alternative considered was to move the stripHost
in the chain before the beforeMiddleware, but this form seems better).
Clean up regex per offline suggestion from zzo@1 parent 68b37d3 commit d65e911Copy full SHA for d65e911
File tree
Expand file treeCollapse file tree
4 files changed
+26
-63
lines changedFilter options
- lib
- middleware
- test/unit/middleware
Expand file treeCollapse file tree
4 files changed
+26
-63
lines changedCollapse file: lib/middleware/karma.js
+6-1Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
90 | 91 |
| |
91 | 92 |
| |
92 | 93 |
| |
93 |
| - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
94 | 99 |
| |
95 | 100 |
| |
96 | 101 |
| |
|
Collapse file: lib/middleware/strip_host.js
lib/middleware/strip_host.js
Copy file name to clipboard+4-11Lines changed: 4 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
14 |
| - | |
| 6 | + | |
| 7 | + | |
15 | 8 |
| |
16 | 9 |
| |
17 | 10 |
| |
18 |
| - | |
| 11 | + |
Collapse file: lib/web-server.js
-2Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
14 | 13 |
| |
15 | 14 |
| |
16 | 15 |
| |
| |||
65 | 64 |
| |
66 | 65 |
| |
67 | 66 |
| |
68 |
| - | |
69 | 67 |
| |
70 | 68 |
| |
71 | 69 |
| |
|
Collapse file: test/unit/middleware/strip_host.spec.js
test/unit/middleware/strip_host.spec.js
Copy file name to clipboard+16-49Lines changed: 16 additions & 49 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
3 | 1 |
| |
4 |
| - | |
5 |
| - | |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 |
| - | |
12 |
| - | |
13 |
| - | |
14 |
| - | |
15 |
| - | |
| 2 | + | |
16 | 3 |
| |
17 |
| - | |
18 |
| - | |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
24 | 7 |
| |
25 | 8 |
| |
26 |
| - | |
27 |
| - | |
28 |
| - | |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
33 | 12 |
| |
34 | 13 |
| |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
42 | 17 |
| |
43 | 18 |
| |
44 |
| - | |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
51 | 22 |
| |
52 | 23 |
| |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
59 |
| - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
60 | 27 |
| |
61 | 28 |
|
You can’t perform that action at this time.
0 commit comments