Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
2e84fe45
Commit
2e84fe45
authored
Jun 28, 2016
by
Matthew Holt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace auto-HTTPS info message and move a method to proper file
parent
d2be213e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
caddyhttp/httpserver/https.go
caddyhttp/httpserver/https.go
+8
-0
caddyhttp/httpserver/plugin.go
caddyhttp/httpserver/plugin.go
+0
-5
caddyhttp/httpserver/siteconfig.go
caddyhttp/httpserver/siteconfig.go
+5
-0
No files found.
caddyhttp/httpserver/https.go
View file @
2e84fe45
package
httpserver
import
(
"fmt"
"net"
"net/http"
...
...
@@ -9,6 +10,10 @@ import (
)
func
activateHTTPS
(
cctx
caddy
.
Context
)
error
{
if
!
caddy
.
Quiet
{
fmt
.
Print
(
"Activating privacy features..."
)
}
ctx
:=
cctx
.
(
*
httpContext
)
// pre-screen each config and earmark the ones that qualify for managed TLS
...
...
@@ -39,6 +44,9 @@ func activateHTTPS(cctx caddy.Context) error {
return
err
}
if
!
caddy
.
Quiet
{
fmt
.
Println
(
" done."
)
}
return
nil
}
...
...
caddyhttp/httpserver/plugin.go
View file @
2e84fe45
...
...
@@ -225,11 +225,6 @@ func groupSiteConfigsByListenAddr(configs []*SiteConfig) (map[string][]*SiteConf
return
groups
,
nil
}
// AddMiddleware adds a middleware to a site's middleware stack.
func
(
sc
*
SiteConfig
)
AddMiddleware
(
m
Middleware
)
{
sc
.
middleware
=
append
(
sc
.
middleware
,
m
)
}
// Address represents a site address. It contains
// the original input value, and the component
// parts of an address. The component parts may be
...
...
caddyhttp/httpserver/siteconfig.go
View file @
2e84fe45
...
...
@@ -32,6 +32,11 @@ type SiteConfig struct {
HiddenFiles
[]
string
}
// AddMiddleware adds a middleware to a site's middleware stack.
func
(
s
*
SiteConfig
)
AddMiddleware
(
m
Middleware
)
{
s
.
middleware
=
append
(
s
.
middleware
,
m
)
}
// TLSConfig returns s.TLS.
func
(
s
SiteConfig
)
TLSConfig
()
*
caddytls
.
Config
{
return
s
.
TLS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment