File tree 4 files changed +35
-1
lines changed
4 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -735,8 +735,11 @@ class Server {
735
735
}
736
736
737
737
if ( this . options . bonjour ) {
738
+ const protocol =
739
+ this . options . bonjour . type || this . options . https ? 'https' : 'http' ;
740
+
738
741
this . logger . info (
739
- ' Broadcasting "http " with subtype of "webpack" via ZeroConf DNS (Bonjour)'
742
+ ` Broadcasting "${ protocol } " with subtype of "webpack" via ZeroConf DNS (Bonjour)`
740
743
) ;
741
744
}
742
745
Original file line number Diff line number Diff line change @@ -9,6 +9,15 @@ exports[`CLI --bonjour 1`] = `
9
9
<i> [webpack-dev-server] Broadcasting \\"http\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
10
10
`;
11
11
12
+ exports[`CLI --bonjour and --https 1`] = `
13
+ "<i> [webpack-dev-server] Project is running at:
14
+ <i> [webpack-dev-server] Loopback: https://localhost:<port>/
15
+ <i> [webpack-dev-server] On Your Network (IPv4): https://<network-ip-v4>:<port>/
16
+ <i> [webpack-dev-server] On Your Network (IPv6): https://[<network-ip-v6>]:<port>/
17
+ <i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory
18
+ <i> [webpack-dev-server] Broadcasting \\"https\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
19
+ `;
20
+
12
21
exports[`CLI --history-api-fallback 1`] = `
13
22
"<i> [webpack-dev-server] Project is running at:
14
23
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
Original file line number Diff line number Diff line change @@ -9,6 +9,15 @@ exports[`CLI --bonjour 1`] = `
9
9
<i> [webpack-dev-server] Broadcasting \\"http\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
10
10
`;
11
11
12
+ exports[`CLI --bonjour and --https 1`] = `
13
+ "<i> [webpack-dev-server] Project is running at:
14
+ <i> [webpack-dev-server] Loopback: https://localhost:<port>/
15
+ <i> [webpack-dev-server] On Your Network (IPv4): https://<network-ip-v4>:<port>/
16
+ <i> [webpack-dev-server] On Your Network (IPv6): https://[<network-ip-v6>]:<port>/
17
+ <i> [webpack-dev-server] Content not from webpack is served from '<cwd>/public' directory
18
+ <i> [webpack-dev-server] Broadcasting \\"https\\" with subtype of \\"webpack\\" via ZeroConf DNS (Bonjour)"
19
+ `;
20
+
12
21
exports[`CLI --history-api-fallback 1`] = `
13
22
"<i> [webpack-dev-server] Project is running at:
14
23
<i> [webpack-dev-server] Loopback: http://localhost:<port>/
Original file line number Diff line number Diff line change @@ -56,6 +56,19 @@ describe('CLI', () => {
56
56
. catch ( done ) ;
57
57
} ) ;
58
58
59
+ it ( '--bonjour and --https' , ( done ) => {
60
+ testBin ( '--bonjour --https' )
61
+ . then ( ( output ) => {
62
+ expect ( output . exitCode ) . toEqual ( 0 ) ;
63
+ expect (
64
+ normalizeStderr ( output . stderr , { ipv6 : true , https : true } )
65
+ ) . toMatchSnapshot ( ) ;
66
+
67
+ done ( ) ;
68
+ } )
69
+ . catch ( done ) ;
70
+ } ) ;
71
+
59
72
it ( '--no-bonjour' , ( done ) => {
60
73
testBin ( '--no-bonjour' )
61
74
. then ( ( output ) => {
You can’t perform that action at this time.
0 commit comments