Documentation
¶
Index ¶
- func AddHtmlIfNoExtensionAndNotFound() func(next http.Handler) http.Handler
- func AddTrailingSlashIfNoExtensionAndNotFound(target *url.URL) func(next http.Handler) http.Handler
- func CheckUrlExists(target *url.URL) (int, error)
- func CheckUrlMD5(target *url.URL) (string, error)
- func GetUrlFromRequest(req *http.Request) *url.URL
- func Md5Cache(target *url.URL) func(next http.Handler) http.Handler
- func NewStorageContainerReverseProxy(target *url.URL) *httputil.ReverseProxy
- func RedirectAssetsByExtension(target *url.URL, extensions []string) func(http.Handler) http.Handler
- func SubdomainAsSubpath(domain string, env string) func(http.Handler) http.Handler
- func TryDefaultEnvOnNotFound(defaultEnv string) func(next http.Handler) http.Handler
- func TryIndexOnNotFound() func(next http.Handler) http.Handler
- type CachedResponse
- type CachedResponseWriter
- type Config
- type ResponseCache
- type StorageContainerProxyHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStorageContainerReverseProxy ¶
func NewStorageContainerReverseProxy(target *url.URL) *httputil.ReverseProxy
func SubdomainAsSubpath ¶
func TryDefaultEnvOnNotFound ¶
Types ¶
type CachedResponse ¶
type CachedResponse struct {
// contains filtered or unexported fields
}
type CachedResponseWriter ¶
type CachedResponseWriter struct {
StatusCode int
Buffer bytes.Buffer
// contains filtered or unexported fields
}
func NewCachedResponseWriter ¶
func NewCachedResponseWriter() *CachedResponseWriter
func (*CachedResponseWriter) Header ¶
func (srrw *CachedResponseWriter) Header() http.Header
func (*CachedResponseWriter) Write ¶
func (srrw *CachedResponseWriter) Write(bytes []byte) (int, error)
func (*CachedResponseWriter) WriteHeader ¶
func (srrw *CachedResponseWriter) WriteHeader(code int)
func (CachedResponseWriter) WriteTo ¶
func (srrw CachedResponseWriter) WriteTo(res http.ResponseWriter) error
type ResponseCache ¶
type ResponseCache struct {
// contains filtered or unexported fields
}
func NewMd5ResponseCache ¶
func NewMd5ResponseCache(entryLifetime time.Duration) *ResponseCache
type StorageContainerProxyHandler ¶
type StorageContainerProxyHandler struct {
AzureStorageAccount string
AzureStorageContainer string
BaseDomain string
DefaultEnv string
UseSubdomains bool
Target *url.URL
}
func NewHandler ¶
func NewHandler(config *Config) StorageContainerProxyHandler
func (*StorageContainerProxyHandler) Listen ¶
func (scp *StorageContainerProxyHandler) Listen()
Click to show internal directories.
Click to hide internal directories.