CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 11:59:54 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/"53ffa683ba874c48e681b378f0ae5991"
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=xBV3H7UUeL42miA1chr%2FiLrC%2Fr6Ofhou8zFo8Rw4l3OSKnlA49HFF84KoYpiGPyeUMAP331iNu2xIASw9QQGJMzVGnZ0YF5EpAdQRK0KLIuy2NzbaxwK7icC5XtSWjepaRDP%2BNiYMckYsKDiHIvEqMatpZ8g4LSW5MGRK3IUyc%2BIaZt3pTZy9yf2OGZN1RhR%2BlRUefvXgeqskO6OoVbu0S9liBe9oxmDgjRP8%2BZTkfPMBwkWlwTp558CPoIHaFB9C%2FTTdJA5sSuZABmHsyogBQ%3D%3D--IYyRJ6fAA5GAqN97--B1zZIhxvA4u64oxcG0hIlQ%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.808176402.1760183993; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 11:59:53 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 11 Oct 2026 11:59:53 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BB2A:123F70:664B19:88204B:68EA46B9
feat: Allow frameworks to inject middleware · karma-runner/karma@d972f3d · GitHub
Copy file name to clipboard
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 d972f3d
committed
feat: Allow frameworks to inject middleware
The Server#_start function was injected with `webServer` and `socketServer`. This prevents frameworks from being able to manipulate `config.middleware` before those servers are created.
The solution is simply to defer injection until after all frameworks have loaded, and then fetch those values with `injector.get`.
There were no e2e tests involving middleware. I have added two, including one that verifies the new capabilities.1 parent eb94739 commit d972f3dCopy full SHA for d972f3d
File tree
Expand file treeCollapse file tree
7 files changed
+99
-11
lines changedFilter options
- lib
- test
- e2e
- support
- middleware
- unit
Expand file treeCollapse file tree
7 files changed
+99
-11
lines changedCollapse file: lib/server.js
+5-2Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
129 | 129 |
| |
130 | 130 |
| |
131 | 131 |
| |
132 |
| - | |
133 |
| - | |
| 132 | + | |
| 133 | + | |
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
| 146 | + | |
| 147 | + | |
| 148 | + | |
146 | 149 |
| |
147 | 150 |
| |
148 | 151 |
| |
|
Collapse file: test/e2e/middleware.feature
test/e2e/middleware.feature
Copy file name to clipboard+44Lines changed: 44 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + |
Collapse file: test/e2e/pass-opts.feature
-1Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 |
| - | |
23 | 22 |
|
Collapse file: test/e2e/support/middleware/middleware.js
test/e2e/support/middleware/middleware.js
Copy file name to clipboard+21Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + |
Collapse file: test/e2e/support/middleware/test.js
test/e2e/support/middleware/test.js
Copy file name to clipboard+14Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + |
Collapse file: test/e2e/support/world.js
+4-1Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 |
| |
19 | 22 |
| |
20 | 23 |
| |
|
Collapse file: test/unit/server.spec.js
+11-7Lines changed: 11 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
87 | 91 |
| |
88 | 92 |
| |
89 | 93 |
| |
| |||
92 | 96 |
| |
93 | 97 |
| |
94 | 98 |
| |
95 |
| - | |
| 99 | + | |
96 | 100 |
| |
97 | 101 |
| |
98 | 102 |
| |
| |||
106 | 110 |
| |
107 | 111 |
| |
108 | 112 |
| |
109 |
| - | |
| 113 | + | |
110 | 114 |
| |
111 | 115 |
| |
112 | 116 |
| |
| |||
120 | 124 |
| |
121 | 125 |
| |
122 | 126 |
| |
123 |
| - | |
| 127 | + | |
124 | 128 |
| |
125 | 129 |
| |
126 | 130 |
| |
| |||
132 | 136 |
| |
133 | 137 |
| |
134 | 138 |
| |
135 |
| - | |
| 139 | + | |
136 | 140 |
| |
137 | 141 |
| |
138 | 142 |
| |
| |||
150 | 154 |
| |
151 | 155 |
| |
152 | 156 |
| |
153 |
| - | |
| 157 | + | |
154 | 158 |
| |
155 | 159 |
| |
156 | 160 |
| |
| |||
163 | 167 |
| |
164 | 168 |
| |
165 | 169 |
| |
166 |
| - | |
| 170 | + | |
167 | 171 |
| |
168 | 172 |
| |
169 | 173 |
| |
| |||
178 | 182 |
| |
179 | 183 |
| |
180 | 184 |
| |
181 |
| - | |
| 185 | + | |
182 | 186 |
| |
183 | 187 |
| |
184 | 188 |
| |
|
You can’t perform that action at this time.
0 commit comments