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
nexedi
caddy
Commits
97e702b9
Commit
97e702b9
authored
May 05, 2015
by
Matt Holt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #51 from ChannelMeter/tls/disable-http
tls: suggestion - disable tls if port is http?
parents
33786408
accb3e61
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
config/setup/tls.go
config/setup/tls.go
+11
-1
No files found.
config/setup/tls.go
View file @
97e702b9
package
setup
package
setup
import
"github.com/mholt/caddy/middleware"
import
(
"github.com/mholt/caddy/middleware"
"log"
)
func
TLS
(
c
*
Controller
)
(
middleware
.
Middleware
,
error
)
{
func
TLS
(
c
*
Controller
)
(
middleware
.
Middleware
,
error
)
{
c
.
TLS
.
Enabled
=
true
c
.
TLS
.
Enabled
=
true
if
c
.
Port
==
"http"
{
c
.
TLS
.
Enabled
=
false
log
.
Printf
(
"Warning: TLS was disabled on host http://%s."
+
" Make sure you are specifying https://%s in your config (if you haven't already)."
+
" If you meant to serve tls on port 80,"
+
" specify port 80 in your config (http://%s:80)."
,
c
.
Host
,
c
.
Host
,
c
.
Host
)
}
for
c
.
Next
()
{
for
c
.
Next
()
{
if
!
c
.
NextArg
()
{
if
!
c
.
NextArg
()
{
...
...
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