mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Proxify articles crawled manually
This commit is contained in:
parent
997006cdd7
commit
6117a2f3cd
6 changed files with 347 additions and 305 deletions
18
proxy/proxy.go
Normal file
18
proxy/proxy.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2020 Frédéric Guillot. All rights reserved.
|
||||
// Use of this source code is governed by the Apache 2.0
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package proxy // import "miniflux.app/proxy"
|
||||
|
||||
import (
|
||||
"encoding/base64"
|
||||
|
||||
"miniflux.app/http/route"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
// ProxifyURL generates an URL for a proxified resource.
|
||||
func ProxifyURL(router *mux.Router, link string) string {
|
||||
return route.Path(router, "proxy", "encodedURL", base64.URLEncoding.EncodeToString([]byte(link)))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue