mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 12:43:58 +08:00
Change all import paths: mholt/caddy -> caddyserver/caddy
Includes updating go.mod to use new module path
This commit is contained in:
parent
0b2e054839
commit
f5720fecd6
16
.github/CONTRIBUTING.md
vendored
16
.github/CONTRIBUTING.md
vendored
|
@ -23,7 +23,7 @@ Other menu items:
|
||||||
|
|
||||||
### Contributing code
|
### Contributing code
|
||||||
|
|
||||||
You can have a direct impact on the project by helping with its code. To contribute code to Caddy, open a [pull request](https://github.com/mholt/caddy/pulls) (PR). If you're new to our community, that's okay: **we gladly welcome pull requests from anyone, regardless of your native language or coding experience.** You can get familiar with Caddy's code base by using [code search at Sourcegraph](https://sourcegraph.com/github.com/mholt/caddy/-/search).
|
You can have a direct impact on the project by helping with its code. To contribute code to Caddy, open a [pull request](https://github.com/caddyserver/caddy/pulls) (PR). If you're new to our community, that's okay: **we gladly welcome pull requests from anyone, regardless of your native language or coding experience.** You can get familiar with Caddy's code base by using [code search at Sourcegraph](https://sourcegraph.com/github.com/caddyserver/caddy/-/search).
|
||||||
|
|
||||||
We hold contributions to a high standard for quality :bowtie:, so don't be surprised if we ask for revisions—even if it seems small or insignificant. Please don't take it personally. :wink: If your change is on the right track, we can guide you to make it mergable.
|
We hold contributions to a high standard for quality :bowtie:, so don't be surprised if we ask for revisions—even if it seems small or insignificant. Please don't take it personally. :wink: If your change is on the right track, we can guide you to make it mergable.
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@ We often grant [collaborator status](#collaborator-instructions) to contributors
|
||||||
|
|
||||||
Contributing to Go projects on GitHub is fun and easy. We recommend the following workflow:
|
Contributing to Go projects on GitHub is fun and easy. We recommend the following workflow:
|
||||||
|
|
||||||
1. [Fork this repo](https://github.com/mholt/caddy). This makes a copy of the code you can write to.
|
1. [Fork this repo](https://github.com/caddyserver/caddy). This makes a copy of the code you can write to.
|
||||||
|
|
||||||
2. If you don't already have this repo (mholt/caddy.git) repo on your computer, get it with `go get github.com/mholt/caddy/caddy`.
|
2. If you don't already have this repo (mholt/caddy.git) repo on your computer, get it with `go get github.com/caddyserver/caddy/caddy`.
|
||||||
|
|
||||||
3. Tell git that it can push the mholt/caddy.git repo to your fork by adding a remote: `git remote add myfork https://github.com/you/caddy.git`
|
3. Tell git that it can push the mholt/caddy.git repo to your fork by adding a remote: `git remote add myfork https://github.com/you/caddy.git`
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ Contributing to Go projects on GitHub is fun and easy. We recommend the followin
|
||||||
|
|
||||||
5. Push your changes to your fork: `git push myfork`
|
5. Push your changes to your fork: `git push myfork`
|
||||||
|
|
||||||
6. [Create a pull request](https://github.com/mholt/caddy/pull/new/master) to merge your changes into mholt/caddy @ master. (Click "compare across forks" and change the head fork.)
|
6. [Create a pull request](https://github.com/caddyserver/caddy/pull/new/master) to merge your changes into mholt/caddy @ master. (Click "compare across forks" and change the head fork.)
|
||||||
|
|
||||||
This workflow is nice because you don't have to change import paths. You can get fancier by using different branches if you want.
|
This workflow is nice because you don't have to change import paths. You can get fancier by using different branches if you want.
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ This workflow is nice because you don't have to change import paths. You can get
|
||||||
|
|
||||||
Caddy can do more with plugins! Anyone can write a plugin. Plugins are Go libraries that get compiled into Caddy, extending its feature set. They can add directives to the Caddyfile, change how the Caddyfile is loaded, and even implement new server types (e.g. HTTP, DNS). When it's ready, you can submit your plugin to the Caddy website so others can download it.
|
Caddy can do more with plugins! Anyone can write a plugin. Plugins are Go libraries that get compiled into Caddy, extending its feature set. They can add directives to the Caddyfile, change how the Caddyfile is loaded, and even implement new server types (e.g. HTTP, DNS). When it's ready, you can submit your plugin to the Caddy website so others can download it.
|
||||||
|
|
||||||
[Learn how to write and submit a plugin](https://github.com/mholt/caddy/wiki) on the wiki. You should also share and discuss your plugin idea [on the forums](https://caddy.community) to have people test it out. We don't use the Caddy issue tracker for plugins.
|
[Learn how to write and submit a plugin](https://github.com/caddyserver/caddy/wiki) on the wiki. You should also share and discuss your plugin idea [on the forums](https://caddy.community) to have people test it out. We don't use the Caddy issue tracker for plugins.
|
||||||
|
|
||||||
|
|
||||||
### Getting help using Caddy
|
### Getting help using Caddy
|
||||||
|
@ -83,7 +83,7 @@ Many people on the forums could benefit from your experience and expertise, too.
|
||||||
|
|
||||||
### Reporting bugs
|
### Reporting bugs
|
||||||
|
|
||||||
Like every software, Caddy has its flaws. If you find one, [search the issues](https://github.com/mholt/caddy/issues) to see if it has already been reported. If not, [open a new issue](https://github.com/mholt/caddy/issues/new) and describe the bug, and somebody will look into it! (This repository is only for Caddy, not plugins.)
|
Like every software, Caddy has its flaws. If you find one, [search the issues](https://github.com/caddyserver/caddy/issues) to see if it has already been reported. If not, [open a new issue](https://github.com/caddyserver/caddy/issues/new) and describe the bug, and somebody will look into it! (This repository is only for Caddy, not plugins.)
|
||||||
|
|
||||||
**You can help stop bugs in their tracks!** Speed up the patch by identifying the bug in the code. This can sometimes be done by adding `fmt.Println()` statements (or similar) in relevant code paths to narrow down where the problem may be. It's a good way to [introduce yourself to the Go language](https://tour.golang.org), too.
|
**You can help stop bugs in their tracks!** Speed up the patch by identifying the bug in the code. This can sometimes be done by adding `fmt.Println()` statements (or similar) in relevant code paths to narrow down where the problem may be. It's a good way to [introduce yourself to the Go language](https://tour.golang.org), too.
|
||||||
|
|
||||||
|
@ -96,9 +96,9 @@ Please be kind. :smile: Remember that Caddy comes at no cost to you, and you're
|
||||||
|
|
||||||
### Suggesting features
|
### Suggesting features
|
||||||
|
|
||||||
First, [search to see if your feature has already been requested](https://github.com/mholt/caddy/issues). If it has, you can add a :+1: reaction to vote for it. If your feature idea is new, open an issue to request the feature. You don't have to follow the bug template for feature requests. Please describe your idea thoroughly so that we know how to implement it! Really vague requests may not be helpful or actionable and without clarification will have to be closed.
|
First, [search to see if your feature has already been requested](https://github.com/caddyserver/caddy/issues). If it has, you can add a :+1: reaction to vote for it. If your feature idea is new, open an issue to request the feature. You don't have to follow the bug template for feature requests. Please describe your idea thoroughly so that we know how to implement it! Really vague requests may not be helpful or actionable and without clarification will have to be closed.
|
||||||
|
|
||||||
While we really do value your requests and implement many of them, not all features are a good fit for Caddy. Most of those [make good plugins](https://github.com/mholt/caddy/wiki), though, which can be made by anyone! But if a feature is not in the best interest of the Caddy project or its users in general, we may politely decline to implement it into Caddy core.
|
While we really do value your requests and implement many of them, not all features are a good fit for Caddy. Most of those [make good plugins](https://github.com/caddyserver/caddy/wiki), though, which can be made by anyone! But if a feature is not in the best interest of the Caddy project or its users in general, we may politely decline to implement it into Caddy core.
|
||||||
|
|
||||||
|
|
||||||
### Improving documentation
|
### Improving documentation
|
||||||
|
|
28
README.md
28
README.md
|
@ -5,12 +5,12 @@
|
||||||
<p align="center">Caddy is a general-purpose HTTP/2 web server that serves HTTPS by default.</p>
|
<p align="center">Caddy is a general-purpose HTTP/2 web server that serves HTTPS by default.</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://dev.azure.com/mholt-dev/Caddy/_build?definitionId=1"><img src="https://img.shields.io/azure-devops/build/mholt-dev/afec6074-9842-457f-98cf-69df6adbbf2e/1/master.svg?label=cross-platform%20tests"></a>
|
<a href="https://dev.azure.com/mholt-dev/Caddy/_build?definitionId=1"><img src="https://img.shields.io/azure-devops/build/mholt-dev/afec6074-9842-457f-98cf-69df6adbbf2e/1/master.svg?label=cross-platform%20tests"></a>
|
||||||
<a href="https://godoc.org/github.com/mholt/caddy"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"></a>
|
<a href="https://godoc.org/github.com/caddyserver/caddy"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"></a>
|
||||||
<a href="https://goreportcard.com/report/mholt/caddy"><img src="https://goreportcard.com/badge/github.com/mholt/caddy"></a>
|
<a href="https://goreportcard.com/report/caddyserver/caddy"><img src="https://goreportcard.com/badge/github.com/caddyserver/caddy"></a>
|
||||||
<br>
|
<br>
|
||||||
<a href="https://twitter.com/caddyserver" title="@caddyserver on Twitter"><img src="https://img.shields.io/badge/twitter-@caddyserver-55acee.svg" alt="@caddyserver on Twitter"></a>
|
<a href="https://twitter.com/caddyserver" title="@caddyserver on Twitter"><img src="https://img.shields.io/badge/twitter-@caddyserver-55acee.svg" alt="@caddyserver on Twitter"></a>
|
||||||
<a href="https://caddy.community" title="Caddy Forum"><img src="https://img.shields.io/badge/community-forum-ff69b4.svg" alt="Caddy Forum"></a>
|
<a href="https://caddy.community" title="Caddy Forum"><img src="https://img.shields.io/badge/community-forum-ff69b4.svg" alt="Caddy Forum"></a>
|
||||||
<a href="https://sourcegraph.com/github.com/mholt/caddy?badge" title="Caddy on Sourcegraph"><img src="https://sourcegraph.com/github.com/mholt/caddy/-/badge.svg" alt="Caddy on Sourcegraph"></a>
|
<a href="https://sourcegraph.com/github.com/caddyserver/caddy?badge" title="Caddy on Sourcegraph"><img src="https://sourcegraph.com/github.com/caddyserver/caddy/-/badge.svg" alt="Caddy on Sourcegraph"></a>
|
||||||
</p>
|
</p>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://caddyserver.com/download">Download</a> ·
|
<a href="https://caddyserver.com/download">Download</a> ·
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
Caddy is a **production-ready** open-source web server that is fast, easy to use, and makes you more productive.
|
Caddy is a **production-ready** open-source web server that is fast, easy to use, and makes you more productive.
|
||||||
|
|
||||||
Available for Windows, Mac, Linux, BSD, Solaris, and [Android](https://github.com/mholt/caddy/wiki/Running-Caddy-on-Android).
|
Available for Windows, Mac, Linux, BSD, Solaris, and [Android](https://github.com/caddyserver/caddy/wiki/Running-Caddy-on-Android).
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<b>Thanks to our special sponsor:</b>
|
<b>Thanks to our special sponsor:</b>
|
||||||
|
@ -68,7 +68,7 @@ Altogether, Caddy can do things other web servers simply cannot do. Its features
|
||||||
Caddy binaries have no dependencies and are available for every platform. Get Caddy any of these ways:
|
Caddy binaries have no dependencies and are available for every platform. Get Caddy any of these ways:
|
||||||
|
|
||||||
- **[Download page](https://caddyserver.com/download)** (RECOMMENDED) allows you to customize your build in the browser
|
- **[Download page](https://caddyserver.com/download)** (RECOMMENDED) allows you to customize your build in the browser
|
||||||
- **[Latest release](https://github.com/mholt/caddy/releases/latest)** for pre-built, vanilla binaries
|
- **[Latest release](https://github.com/caddyserver/caddy/releases/latest)** for pre-built, vanilla binaries
|
||||||
- **[AWS Marketplace](https://aws.amazon.com/marketplace/pp/B07J1WNK75?qid=1539015041932&sr=0-1&ref_=srh_res_product_title&cl_spe=C)** makes it easy to deploy directly to your cloud environment. <a href="https://aws.amazon.com/marketplace/pp/B07J1WNK75?qid=1539015041932&sr=0-1&ref_=srh_res_product_title&cl_spe=C" target="_blank">
|
- **[AWS Marketplace](https://aws.amazon.com/marketplace/pp/B07J1WNK75?qid=1539015041932&sr=0-1&ref_=srh_res_product_title&cl_spe=C)** makes it easy to deploy directly to your cloud environment. <a href="https://aws.amazon.com/marketplace/pp/B07J1WNK75?qid=1539015041932&sr=0-1&ref_=srh_res_product_title&cl_spe=C" target="_blank">
|
||||||
<img src="https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png" alt="Get Caddy on the AWS Marketplace" height="25"/></a>
|
<img src="https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png" alt="Get Caddy on the AWS Marketplace" height="25"/></a>
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ To build from source you need **[Git](https://git-scm.com/downloads)** and **[Go
|
||||||
|
|
||||||
<!-- TODO: This env variable will not be required starting with Go 1.13 -->
|
<!-- TODO: This env variable will not be required starting with Go 1.13 -->
|
||||||
1. Set the transitional environment variable for Go modules: `export GO111MODULE=on`
|
1. Set the transitional environment variable for Go modules: `export GO111MODULE=on`
|
||||||
2. Run `go get github.com/mholt/caddy/caddy`
|
2. Run `go get github.com/caddyserver/caddy/caddy`
|
||||||
|
|
||||||
Caddy will be installed to your `$GOPATH/bin` folder.
|
Caddy will be installed to your `$GOPATH/bin` folder.
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ There is no need to modify the Caddy code to build it with plugins. We will crea
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mholt/caddy/caddy/caddymain"
|
"github.com/caddyserver/caddy/caddy/caddymain"
|
||||||
|
|
||||||
// plug in plugins here, for example:
|
// plug in plugins here, for example:
|
||||||
// _ "import/path/here"
|
// _ "import/path/here"
|
||||||
|
@ -111,14 +111,14 @@ func main() {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
3. `go mod init caddy`
|
3. `go mod init caddy`
|
||||||
4. Run `go get github.com/mholt/caddy`
|
4. Run `go get github.com/caddyserver/caddy`
|
||||||
5. `go install` will then create your binary at `$GOPATH/bin`, or `go build` will put it in the current directory.
|
5. `go install` will then create your binary at `$GOPATH/bin`, or `go build` will put it in the current directory.
|
||||||
|
|
||||||
**To install Caddy's source code for development:**
|
**To install Caddy's source code for development:**
|
||||||
|
|
||||||
<!-- TODO: This env variable will not be required starting with Go 1.13 -->
|
<!-- TODO: This env variable will not be required starting with Go 1.13 -->
|
||||||
1. Set the transitional environment variable for Go modules: `export GO111MODULE=on`
|
1. Set the transitional environment variable for Go modules: `export GO111MODULE=on`
|
||||||
2. Run `git clone https://github.com/mholt/caddy.git` in any folder (doesn't have to be in GOPATH).
|
2. Run `git clone https://github.com/caddyserver/caddy.git` in any folder (doesn't have to be in GOPATH).
|
||||||
|
|
||||||
You can make changes to the source code from that clone and checkout any commit or tag you wish to develop on.
|
You can make changes to the source code from that clone and checkout any commit or tag you wish to develop on.
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ Caddy is production-ready if you find it to be a good fit for your site and work
|
||||||
|
|
||||||
**Running as root:** We advise against this. You can still listen on ports < 1024 on Linux using setcap like so: `sudo setcap cap_net_bind_service=+ep ./caddy`
|
**Running as root:** We advise against this. You can still listen on ports < 1024 on Linux using setcap like so: `sudo setcap cap_net_bind_service=+ep ./caddy`
|
||||||
|
|
||||||
The Caddy project does not officially maintain any system-specific integrations nor suggest how to administer your own system. But your download file includes [unofficial resources](https://github.com/mholt/caddy/tree/master/dist/init) contributed by the community that you may find helpful for running Caddy in production.
|
The Caddy project does not officially maintain any system-specific integrations nor suggest how to administer your own system. But your download file includes [unofficial resources](https://github.com/caddyserver/caddy/tree/master/dist/init) contributed by the community that you may find helpful for running Caddy in production.
|
||||||
|
|
||||||
How you choose to run Caddy is up to you. Many users are satisfied with `nohup caddy &`. Others use `screen`. Users who need Caddy to come back up after reboots either do so in the script that caused the reboot, add a command to an init script, or configure a service with their OS.
|
How you choose to run Caddy is up to you. Many users are satisfied with `nohup caddy &`. Others use `screen`. Users who need Caddy to come back up after reboots either do so in the script that caused the reboot, add a command to an init script, or configure a service with their OS.
|
||||||
|
|
||||||
|
@ -191,17 +191,17 @@ If you have questions or concerns about Caddy' underlying crypto implementations
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
**[Join our forum](https://caddy.community) where you can chat with other Caddy users and developers!** To get familiar with the code base, try [Caddy code search on Sourcegraph](https://sourcegraph.com/github.com/mholt/caddy/)!
|
**[Join our forum](https://caddy.community) where you can chat with other Caddy users and developers!** To get familiar with the code base, try [Caddy code search on Sourcegraph](https://sourcegraph.com/github.com/caddyserver/caddy/)!
|
||||||
|
|
||||||
Please see our [contributing guidelines](https://github.com/mholt/caddy/blob/master/.github/CONTRIBUTING.md) for instructions. If you want to write a plugin, check out the [developer wiki](https://github.com/mholt/caddy/wiki).
|
Please see our [contributing guidelines](https://github.com/caddyserver/caddy/blob/master/.github/CONTRIBUTING.md) for instructions. If you want to write a plugin, check out the [developer wiki](https://github.com/caddyserver/caddy/wiki).
|
||||||
|
|
||||||
We use GitHub issues and pull requests only for discussing bug reports and the development of specific changes. We welcome all other topics on the [forum](https://caddy.community)!
|
We use GitHub issues and pull requests only for discussing bug reports and the development of specific changes. We welcome all other topics on the [forum](https://caddy.community)!
|
||||||
|
|
||||||
If you want to contribute to the documentation, please [submit an issue](https://github.com/mholt/caddy/issues/new) describing the change that should be made.
|
If you want to contribute to the documentation, please [submit an issue](https://github.com/caddyserver/caddy/issues/new) describing the change that should be made.
|
||||||
|
|
||||||
### Good First Issue
|
### Good First Issue
|
||||||
|
|
||||||
If you are looking for somewhere to start and would like to help out by working on an existing issue, take a look at our [`Good First Issue`](https://github.com/mholt/caddy/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag
|
If you are looking for somewhere to start and would like to help out by working on an existing issue, take a look at our [`Good First Issue`](https://github.com/caddyserver/caddy/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag
|
||||||
|
|
||||||
Thanks for making Caddy -- and the Web -- better!
|
Thanks for making Caddy -- and the Web -- better!
|
||||||
|
|
||||||
|
|
6
caddy.go
6
caddy.go
|
@ -20,7 +20,7 @@
|
||||||
// 2. Call LoadCaddyfile() to get the Caddyfile.
|
// 2. Call LoadCaddyfile() to get the Caddyfile.
|
||||||
// Pass in the name of the server type (like "http").
|
// Pass in the name of the server type (like "http").
|
||||||
// Make sure the server type's package is imported
|
// Make sure the server type's package is imported
|
||||||
// (import _ "github.com/mholt/caddy/caddyhttp").
|
// (import _ "github.com/caddyserver/caddy/caddyhttp").
|
||||||
// 3. Call caddy.Start() to start Caddy. You get back
|
// 3. Call caddy.Start() to start Caddy. You get back
|
||||||
// an Instance, on which you can call Restart() to
|
// an Instance, on which you can call Restart() to
|
||||||
// restart it or Stop() to stop it.
|
// restart it or Stop() to stop it.
|
||||||
|
@ -43,8 +43,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
"github.com/mholt/caddy/telemetry"
|
"github.com/caddyserver/caddy/telemetry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Configurable application parameters
|
// Configurable application parameters
|
||||||
|
|
|
@ -31,14 +31,14 @@ import (
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/klauspost/cpuid"
|
"github.com/klauspost/cpuid"
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
"github.com/mholt/caddy/telemetry"
|
"github.com/caddyserver/caddy/telemetry"
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
lumberjack "gopkg.in/natefinch/lumberjack.v2"
|
lumberjack "gopkg.in/natefinch/lumberjack.v2"
|
||||||
|
|
||||||
_ "github.com/mholt/caddy/caddyhttp" // plug in the HTTP server type
|
_ "github.com/caddyserver/caddy/caddyhttp" // plug in the HTTP server type
|
||||||
// This is where other plugins get plugged in (imported)
|
// This is where other plugins get plugged in (imported)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ func getBuildModule() *debug.Module {
|
||||||
// preserves caddy a read-only dependency
|
// preserves caddy a read-only dependency
|
||||||
// TODO: track related Go issue: https://github.com/golang/go/issues/29228
|
// TODO: track related Go issue: https://github.com/golang/go/issues/29228
|
||||||
for _, mod := range bi.Deps {
|
for _, mod := range bi.Deps {
|
||||||
if mod.Path == "github.com/mholt/caddy" {
|
if mod.Path == "github.com/caddyserver/caddy" {
|
||||||
return mod
|
return mod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "github.com/mholt/caddy/caddy/caddymain"
|
import "github.com/caddyserver/caddy/caddy/caddymain"
|
||||||
|
|
||||||
var run = caddymain.Run // replaced for tests
|
var run = caddymain.Run // replaced for tests
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -34,7 +34,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/jimstudt/http-authentication/basic"
|
"github.com/jimstudt/http-authentication/basic"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BasicAuth is middleware to protect resources with a username and password.
|
// BasicAuth is middleware to protect resources with a username and password.
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBasicAuth(t *testing.T) {
|
func TestBasicAuth(t *testing.T) {
|
||||||
|
@ -110,7 +110,7 @@ func TestBasicAuth(t *testing.T) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if req.Header.Get("Authorization") == "" {
|
if req.Header.Get("Authorization") == "" {
|
||||||
// see issue #1508: https://github.com/mholt/caddy/issues/1508
|
// see issue #1508: https://github.com/caddyserver/caddy/issues/1508
|
||||||
t.Errorf("Test %d: Expected Authorization header to be retained after successful auth, but was empty", i)
|
t.Errorf("Test %d: Expected Authorization header to be retained after successful auth, but was empty", i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,8 @@ package basicauth
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -21,8 +21,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package bind
|
package bind
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -17,8 +17,8 @@ package bind
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetupBind(t *testing.T) {
|
func TestSetupBind(t *testing.T) {
|
||||||
|
|
|
@ -30,8 +30,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dustin/go-humanize"
|
"github.com/dustin/go-humanize"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/mholt/caddy/caddyhttp/staticfiles"
|
"github.com/caddyserver/caddy/caddyhttp/staticfiles"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -31,8 +31,8 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/mholt/caddy/caddyhttp/staticfiles"
|
"github.com/caddyserver/caddy/caddyhttp/staticfiles"
|
||||||
)
|
)
|
||||||
|
|
||||||
const testDirPrefix = "caddy_browse_test"
|
const testDirPrefix = "caddy_browse_test"
|
||||||
|
|
|
@ -20,9 +20,9 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/mholt/caddy/caddyhttp/staticfiles"
|
"github.com/caddyserver/caddy/caddyhttp/staticfiles"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -22,8 +22,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -16,34 +16,34 @@ package caddyhttp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
// plug in the server
|
// plug in the server
|
||||||
_ "github.com/mholt/caddy/caddyhttp/httpserver"
|
_ "github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
|
|
||||||
// plug in the standard directives
|
// plug in the standard directives
|
||||||
_ "github.com/mholt/caddy/caddyhttp/basicauth"
|
_ "github.com/caddyserver/caddy/caddyhttp/basicauth"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/bind"
|
_ "github.com/caddyserver/caddy/caddyhttp/bind"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/browse"
|
_ "github.com/caddyserver/caddy/caddyhttp/browse"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/errors"
|
_ "github.com/caddyserver/caddy/caddyhttp/errors"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/expvar"
|
_ "github.com/caddyserver/caddy/caddyhttp/expvar"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/extensions"
|
_ "github.com/caddyserver/caddy/caddyhttp/extensions"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/fastcgi"
|
_ "github.com/caddyserver/caddy/caddyhttp/fastcgi"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/gzip"
|
_ "github.com/caddyserver/caddy/caddyhttp/gzip"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/header"
|
_ "github.com/caddyserver/caddy/caddyhttp/header"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/index"
|
_ "github.com/caddyserver/caddy/caddyhttp/index"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/internalsrv"
|
_ "github.com/caddyserver/caddy/caddyhttp/internalsrv"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/limits"
|
_ "github.com/caddyserver/caddy/caddyhttp/limits"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/log"
|
_ "github.com/caddyserver/caddy/caddyhttp/log"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/markdown"
|
_ "github.com/caddyserver/caddy/caddyhttp/markdown"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/mime"
|
_ "github.com/caddyserver/caddy/caddyhttp/mime"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/pprof"
|
_ "github.com/caddyserver/caddy/caddyhttp/pprof"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/proxy"
|
_ "github.com/caddyserver/caddy/caddyhttp/proxy"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/push"
|
_ "github.com/caddyserver/caddy/caddyhttp/push"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/redirect"
|
_ "github.com/caddyserver/caddy/caddyhttp/redirect"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/requestid"
|
_ "github.com/caddyserver/caddy/caddyhttp/requestid"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/rewrite"
|
_ "github.com/caddyserver/caddy/caddyhttp/rewrite"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/root"
|
_ "github.com/caddyserver/caddy/caddyhttp/root"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/status"
|
_ "github.com/caddyserver/caddy/caddyhttp/status"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/templates"
|
_ "github.com/caddyserver/caddy/caddyhttp/templates"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/timeouts"
|
_ "github.com/caddyserver/caddy/caddyhttp/timeouts"
|
||||||
_ "github.com/mholt/caddy/caddyhttp/websocket"
|
_ "github.com/caddyserver/caddy/caddyhttp/websocket"
|
||||||
_ "github.com/mholt/caddy/onevent"
|
_ "github.com/caddyserver/caddy/onevent"
|
||||||
)
|
)
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: this test could be improved; the purpose is to
|
// TODO: this test could be improved; the purpose is to
|
||||||
|
|
|
@ -24,8 +24,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -142,7 +142,7 @@ func (h ErrorHandler) recovery(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trim file path
|
// Trim file path
|
||||||
delim := "/github.com/mholt/caddy/"
|
delim := "/github.com/caddyserver/caddy/"
|
||||||
pkgPathPos := strings.Index(file, delim)
|
pkgPathPos := strings.Index(file, delim)
|
||||||
if pkgPathPos > -1 && len(file) > pkgPathPos+len(delim) {
|
if pkgPathPos > -1 && len(file) > pkgPathPos+len(delim) {
|
||||||
file = file[pkgPathPos+len(delim):]
|
file = file[pkgPathPos+len(delim):]
|
||||||
|
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestErrors(t *testing.T) {
|
func TestErrors(t *testing.T) {
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setup configures a new errors middleware instance.
|
// setup configures a new errors middleware instance.
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ExpVar is a simple struct to hold expvar's configuration
|
// ExpVar is a simple struct to hold expvar's configuration
|
||||||
|
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestExpVar(t *testing.T) {
|
func TestExpVar(t *testing.T) {
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -17,8 +17,8 @@ package expvar
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Ext can assume an extension from clean URLs.
|
// Ext can assume an extension from clean URLs.
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package extensions
|
package extensions
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -17,8 +17,8 @@ package extensions
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -35,9 +35,9 @@ import (
|
||||||
|
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Handler is a middleware type that can handle requests as a FastCGI client.
|
// Handler is a middleware type that can handle requests as a FastCGI client.
|
||||||
|
|
|
@ -28,8 +28,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestServeHTTP(t *testing.T) {
|
func TestServeHTTP(t *testing.T) {
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultTimeout = 60 * time.Second
|
var defaultTimeout = 60 * time.Second
|
||||||
|
|
|
@ -21,8 +21,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -22,8 +22,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -67,7 +67,7 @@ outer:
|
||||||
}
|
}
|
||||||
|
|
||||||
// In order to avoid unused memory allocation, gzip.putWriter only be called when gzip compression happened.
|
// In order to avoid unused memory allocation, gzip.putWriter only be called when gzip compression happened.
|
||||||
// see https://github.com/mholt/caddy/issues/2395
|
// see https://github.com/caddyserver/caddy/issues/2395
|
||||||
gz := &gzipResponseWriter{
|
gz := &gzipResponseWriter{
|
||||||
ResponseWriterWrapper: &httpserver.ResponseWriterWrapper{ResponseWriter: w},
|
ResponseWriterWrapper: &httpserver.ResponseWriterWrapper{ResponseWriter: w},
|
||||||
newWriter: func() io.Writer {
|
newWriter: func() io.Writer {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGzipHandler(t *testing.T) {
|
func TestGzipHandler(t *testing.T) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RequestFilter determines if a request should be gzipped.
|
// RequestFilter determines if a request should be gzipped.
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLengthFilter(t *testing.T) {
|
func TestLengthFilter(t *testing.T) {
|
||||||
|
|
|
@ -22,8 +22,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setup configures a new gzip middleware instance.
|
// setup configures a new gzip middleware instance.
|
||||||
|
|
|
@ -17,8 +17,8 @@ package gzip
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Headers is middleware that adds headers to the responses
|
// Headers is middleware that adds headers to the responses
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHeader(t *testing.T) {
|
func TestHeader(t *testing.T) {
|
||||||
|
|
|
@ -17,8 +17,8 @@ package header
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SetupIfMatcher parses `if` or `if_op` in the current dispenser block.
|
// SetupIfMatcher parses `if` or `if_op` in the current dispenser block.
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConditions(t *testing.T) {
|
func TestConditions(t *testing.T) {
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
gsyslog "github.com/hashicorp/go-syslog"
|
gsyslog "github.com/hashicorp/go-syslog"
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
)
|
)
|
||||||
|
|
||||||
var remoteSyslogPrefixes = map[string]string{
|
var remoteSyslogPrefixes = map[string]string{
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"path"
|
"path"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -25,8 +25,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
"github.com/mholt/caddy/telemetry"
|
"github.com/caddyserver/caddy/telemetry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// tlsHandler is a http.Handler that will inject a value
|
// tlsHandler is a http.Handler that will inject a value
|
||||||
|
|
|
@ -27,11 +27,11 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
"github.com/mholt/caddy/caddyhttp/staticfiles"
|
"github.com/caddyserver/caddy/caddyhttp/staticfiles"
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
"github.com/mholt/caddy/telemetry"
|
"github.com/caddyserver/caddy/telemetry"
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ import (
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStandardizeAddress(t *testing.T) {
|
func TestStandardizeAddress(t *testing.T) {
|
||||||
|
|
|
@ -32,8 +32,8 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
)
|
)
|
||||||
|
|
||||||
// requestReplacer is a strings.Replacer which is used to
|
// requestReplacer is a strings.Replacer which is used to
|
||||||
|
|
|
@ -30,7 +30,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewReplacer(t *testing.T) {
|
func TestNewReplacer(t *testing.T) {
|
||||||
|
|
|
@ -32,10 +32,10 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/lucas-clemente/quic-go/h2quic"
|
"github.com/lucas-clemente/quic-go/h2quic"
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/staticfiles"
|
"github.com/caddyserver/caddy/caddyhttp/staticfiles"
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
"github.com/mholt/caddy/telemetry"
|
"github.com/caddyserver/caddy/telemetry"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Server is the HTTP server implementation.
|
// Server is the HTTP server implementation.
|
||||||
|
|
|
@ -17,7 +17,7 @@ package httpserver
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SiteConfig contains information about a site
|
// SiteConfig contains information about a site
|
||||||
|
|
|
@ -33,7 +33,7 @@ import (
|
||||||
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddytls"
|
"github.com/caddyserver/caddy/caddytls"
|
||||||
"github.com/mholt/certmagic"
|
"github.com/mholt/certmagic"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
)
|
)
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package index
|
package index
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -17,9 +17,9 @@ package index
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/mholt/caddy/caddyhttp/staticfiles"
|
"github.com/caddyserver/caddy/caddyhttp/staticfiles"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIndexIncompleteParams(t *testing.T) {
|
func TestIndexIncompleteParams(t *testing.T) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ package internalsrv
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Internal middleware protects internal locations from external requests -
|
// Internal middleware protects internal locations from external requests -
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
|
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package internalsrv
|
package internalsrv
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -17,8 +17,8 @@ package internalsrv
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Limit is a middleware to control request body size
|
// Limit is a middleware to control request body size
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBodySizeLimit(t *testing.T) {
|
func TestBodySizeLimit(t *testing.T) {
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -23,7 +23,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type erroringMiddleware struct{}
|
type erroringMiddleware struct{}
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setup sets up the logging middleware.
|
// setup sets up the logging middleware.
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import (
|
||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/mholt/caddy/caddyhttp/markdown/metadata"
|
"github.com/caddyserver/caddy/caddyhttp/markdown/metadata"
|
||||||
"github.com/mholt/caddy/caddyhttp/markdown/summary"
|
"github.com/caddyserver/caddy/caddyhttp/markdown/summary"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConfig_Markdown(t *testing.T) {
|
func TestConfig_Markdown(t *testing.T) {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/russross/blackfriday"
|
"github.com/russross/blackfriday"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -21,8 +21,8 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
"github.com/mholt/caddy/caddyhttp/markdown/metadata"
|
"github.com/caddyserver/caddy/caddyhttp/markdown/metadata"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Data represents a markdown document.
|
// Data represents a markdown document.
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config represent a mime config. Map from extension to mime-type.
|
// Config represent a mime config. Map from extension to mime-type.
|
||||||
|
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMimeHandler(t *testing.T) {
|
func TestMimeHandler(t *testing.T) {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -17,8 +17,8 @@ package mime
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
pp "net/http/pprof"
|
pp "net/http/pprof"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BasePath is the base path to match for all pprof requests.
|
// BasePath is the base path to match for all pprof requests.
|
||||||
|
|
|
@ -20,7 +20,7 @@ import (
|
||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestServeHTTP(t *testing.T) {
|
func TestServeHTTP(t *testing.T) {
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package pprof
|
package pprof
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -17,7 +17,7 @@ package pprof
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Proxy represents a middleware instance that can proxy requests.
|
// Proxy represents a middleware instance that can proxy requests.
|
||||||
|
|
|
@ -40,8 +40,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/lucas-clemente/quic-go/h2quic"
|
"github.com/lucas-clemente/quic-go/h2quic"
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
|
|
||||||
"golang.org/x/net/websocket"
|
"golang.org/x/net/websocket"
|
||||||
)
|
)
|
||||||
|
|
|
@ -43,7 +43,7 @@ import (
|
||||||
|
|
||||||
"github.com/lucas-clemente/quic-go"
|
"github.com/lucas-clemente/quic-go"
|
||||||
"github.com/lucas-clemente/quic-go/h2quic"
|
"github.com/lucas-clemente/quic-go/h2quic"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -515,7 +515,7 @@ func (rp *ReverseProxy) copyResponse(dst io.Writer, src io.Reader) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// skip these headers if they already exist.
|
// skip these headers if they already exist.
|
||||||
// see https://github.com/mholt/caddy/pull/1112#discussion_r80092582
|
// see https://github.com/caddyserver/caddy/pull/1112#discussion_r80092582
|
||||||
var skipHeaders = map[string]struct{}{
|
var skipHeaders = map[string]struct{}{
|
||||||
"Content-Type": {},
|
"Content-Type": {},
|
||||||
"Content-Disposition": {},
|
"Content-Disposition": {},
|
||||||
|
@ -529,7 +529,7 @@ func copyHeader(dst, src http.Header) {
|
||||||
for k, vv := range src {
|
for k, vv := range src {
|
||||||
if _, ok := dst[k]; ok {
|
if _, ok := dst[k]; ok {
|
||||||
// skip some predefined headers
|
// skip some predefined headers
|
||||||
// see https://github.com/mholt/caddy/issues/1086
|
// see https://github.com/caddyserver/caddy/issues/1086
|
||||||
if _, shouldSkip := skipHeaders[k]; shouldSkip {
|
if _, shouldSkip := skipHeaders[k]; shouldSkip {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
package proxy
|
package proxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -18,8 +18,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSetup(t *testing.T) {
|
func TestSetup(t *testing.T) {
|
||||||
|
|
|
@ -36,8 +36,8 @@ import (
|
||||||
|
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -645,7 +645,7 @@ func (u *staticUpstream) healthCheck() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// TODO ReadAll will be replaced if deemed necessary
|
// TODO ReadAll will be replaced if deemed necessary
|
||||||
// See https://github.com/mholt/caddy/pull/1691
|
// See https://github.com/caddyserver/caddy/pull/1691
|
||||||
buf, err := ioutil.ReadAll(r.Body)
|
buf, err := ioutil.ReadAll(r.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -31,7 +31,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/lucas-clemente/quic-go/h2quic"
|
"github.com/lucas-clemente/quic-go/h2quic"
|
||||||
"github.com/mholt/caddy/caddyfile"
|
"github.com/caddyserver/caddy/caddyfile"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewHost(t *testing.T) {
|
func TestNewHost(t *testing.T) {
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (h Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
func (h Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MockedPusher struct {
|
type MockedPusher struct {
|
||||||
|
|
|
@ -17,7 +17,7 @@ package push
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
|
|
|
@ -20,8 +20,8 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -19,8 +19,8 @@ import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy"
|
"github.com/caddyserver/caddy"
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPushAvailable(t *testing.T) {
|
func TestPushAvailable(t *testing.T) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import (
|
||||||
"html"
|
"html"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Redirect is middleware to respond with HTTP redirects
|
// Redirect is middleware to respond with HTTP redirects
|
||||||
|
|
|
@ -25,7 +25,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/mholt/caddy/caddyhttp/httpserver"
|
"github.com/caddyserver/caddy/caddyhttp/httpserver"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRedirect(t *testing.T) {
|
func TestRedirect(t *testing.T) {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user