mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
PWA: Warning and cache visible entries
This commit is contained in:
parent
925ea2c082
commit
c50edd735a
4 changed files with 41 additions and 3 deletions
|
@ -140,6 +140,11 @@ func LastForceRefresh(r *http.Request) int64 {
|
|||
return timestamp
|
||||
}
|
||||
|
||||
// Determine if the request is from a service worker.
|
||||
func IsServiceWorker(r *http.Request) bool {
|
||||
return r.Header.Get("Client-Type") == "service-worker"
|
||||
}
|
||||
|
||||
// ClientIP returns the client IP address stored in the context.
|
||||
func ClientIP(r *http.Request) string {
|
||||
return getContextStringValue(r, ClientIPContextKey)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue