8000 [pull] main from miniflux:main by pull[bot] · Pull Request #205 · suhaoGe/miniflux · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const (
flagDebugModeHelp = "Show debug logs"
flagConfigFileHelp = "Load configuration file"
flagConfigDumpHelp = "Print parsed configuration values"
flagHealthCheckHelp = `Perform a health check on the given endpoint (the value "auto" try to guess the health check endpoint).`
flagHealthCheckHelp = `Perform a health check on the given endpoint (the value "auto" tries to guess the health check endpoint).`
flagRefreshFeedsHelp = "Refresh a batch of feeds and exit"
flagRunCleanupTasksHelp = "Run cleanup tasks (delete old sessions and archives old entries)"
flagRunCleanupTasksHelp = "Run cleanup tasks (delete old sessions and archive old entries)"
flagExportUserFeedsHelp = "Export user feeds (provide the username as argument)"
flagResetNextCheckAtHelp = "Reset the next check time for all feeds"
)
Expand Down
13 changes: 5 additions & 8 deletions internal/googlereader/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ func Serve(router *mux.Router, store *storage.Storage) {

middleware := newMiddleware(store)
sr := router.PathPrefix("/reader/api/0").Subrouter()
sr.Use(middleware.handleCORS)
sr.Use(middleware.apiKeyAuth)
sr.Methods(http.MethodOptions)
sr.HandleFunc("/token", handler.tokenHandler).Methods(http.MethodGet).Name("Token")
sr.HandleFunc("/edit-tag", handler.editTagHandler).Methods(http.MethodPost).Name("EditTag")
sr.HandleFunc("/rename-tag", handler.renameTagHandler).Methods(http.MethodPost).Name("Rename Tag")
Expand Down Expand Up @@ -244,7 +242,6 @@ func (h *handler) tokenHandler(w http.ResponseWriter, r *http.Request) {
slog.String("client_ip", clientIP),
slog.String("user_agent", r.UserAgent()),
slog.Int64("user_id", request.UserID(r)),
slog.String("token", token),
)

w.Header().Add("Content-Type", "text/plain; charset=UTF-8")
Expand Down Expand Up @@ -1003,16 +1000,16 @@ func (h *handler) userInfoHandler(w http.ResponseWriter, r *http.Request) {
slog.String("user_agent", r.UserAgent()),
)

if err := checkOutputFormat(r); err != nil {
json.BadRequest(w, r, err)
return
}

user, err := h.store.UserByID(request.UserID(r))
if err != nil {
json.ServerError(w, r, err)
return
}
if user == nil {
json.NotFound(w, r)
return
}

userInfo := userInfoResponse{UserID: strconv.FormatInt(user.ID, 10), UserName: user.Username, UserProfileID: strconv.FormatInt(user.ID, 10), UserEmail: user.Username}
json.OK(w, r, userInfo)
}
Expand Down
13 changes: 0 additions & 13 deletions internal/googlereader/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,6 @@ func newMiddleware(s *storage.Storage) *middleware {
return &middleware{s}
}

func (m 10BC8 *middleware) handleCORS(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Authorization")
if r.Method == http.MethodOptions {
w.WriteHeader(http.StatusOK)
return
}
next.ServeHTTP(w, r)
})
}

func (m *middleware) apiKeyAuth(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
clientIP := request.ClientIP(r)
Expand Down
6 changes: 3 additions & 3 deletions internal/locale/translations/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"form.integration.linkwarden_activate": "Artikel in Linkwarden speichern",
"form.integration.linkwarden_api_key": "Linkwarden-API-Schlüssel",
"form.integration.linkwarden_endpoint": "Linkwarden-Base-URL",
"form.integration.linkwarden_collection_id": "Linkwarden Collection ID",
"form.integration.linkwarden_collection_id": "Linkwarden-Sammlungs-ID",
"form.integration.matrix_bot_activate": "Neue Artikel in Matrix übertragen",
"form.integration.matrix_bot_chat_id": "ID des Matrix-Raums",
"form.integration.matrix_bot_password": "Passwort für Matrix-Benutzer",
Expand Down Expand Up @@ -372,10 +372,10 @@
"form.prefs.label.theme": "Thema",
"form.prefs.label.timezone": "Zeitzone",
"form.prefs.select.alphabetical": "Alphabetisch",
"form.prefs.select.browser": "Browser",
"form.prefs.select.browser": "Systembrowser",
"form.prefs.select.created_time": "Artikel erstellt am",
"form.prefs.select.fullscreen": "Vollbildschirm",
"form.prefs.select.minimal_ui": "Minimal",
"form.prefs.select.minimal_ui": "Minimale Oberfläche",
"form.prefs.select.none": "Keine",
"form.prefs.select.older_first": "Ältere Artikel zuerst",
"form.prefs.select.publish_time": "Artikel veröffentlicht am",
Expand Down
22 changes: 11 additions & 11 deletions internal/locale/translations/el_EL.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@
"form.integration.linkding_endpoint": "Τελικό σημείο Linkding API",
"form.integration.linkding_tags": "Ετικέτες Linkding",
"form.integration.linktaco_activate": "Αποθήκευση καταχωρήσεων στο LinkTaco",
"form.integration.linktaco_api_token": "LinkTaco API Token",
"form.integration.linktaco_api_token": "Διακριτικό API LinkTaco",
"form.integration.linktaco_api_token_hint": "Λάβετε το προσωπικό σας διακριτικό πρόσβασης στο",
"form.integration.linktaco_org_slug": "Organization Slug",
"form.integration.linktaco_org_slug": "Σύντομο όνομα οργανισμού",
"form.integration.linktaco_tags": "Ετικέτες (μέγιστο 10, διαχωρισμένες με κόμμα)",
"form.integration.linktaco_tags_hint": "Μέγιστο 10 ετικέτες, διαχωρισμένες με κόμμα",
"form.integration.linktaco_visibility": "Ορατότητα",
Expand All @@ -266,7 +266,7 @@
"form.integration.linkwarden_activate": "Αποθήκευση άρθρων στο Linkwarden",
"form.integration.linkwarden_api_key": "Κλειδί API Linkwarden",
"form.integration.linkwarden_endpoint": "URL βάσης Linkwarden",
"form.integration.linkwarden_collection_id": "Linkwarden Collection ID",
"form.integration.linkwarden_collection_id": "ID συλλογής Linkwarden",
"form.integration.matrix_bot_activate": "Μεταφορά νέων άρθρων στο Matrix",
"form.integration.matrix_bot_chat_id": "Αναγνωριστικό της αίθουσας Matrix",
"form.integration.matrix_bot_password": "Κωδικός πρόσβασης για τον χρήστη Matrix",
Expand Down Expand Up @@ -307,7 +307,7 @@
"form.integration.readeck_endpoint": "Τελικό σημείο Readeck API",
"form.integration.readeck_labels": "Ετικέτες Readeck",
"form.integration.readeck_only_url": "Αποστολή μόνο URL (αντί για πλήρες περιεχόμενο)",
"form.integration.readeck_push_activate": "Automatically push new entries to Readeck",
"form.integration.readeck_push_activate": "Αυτόματη αποστολή νέων καταχωρήσεων στο Readeck",
"form.integration.readwise_activate": "Αποθήκευση καταχωρήσεων στο Readwise Reader",
"form.integration.readwise_api_key": "Διακριτικό πρόσβασης Readwise Reader",
"form.integration.readwise_api_key_link": "Λήψη του διακριτικού πρόσβασης Readwise",
Expand Down Expand Up @@ -337,7 +337,7 @@
"form.integration.wallabag_only_url": "Αποστολή μόνο URL (αντί για πλήρες περιεχόμενο)",
"form.integration.wallabag_password": "Wallabag Κωδικός Πρόσβασης",
"form.integration.wallabag_username": "Όνομα Χρήστη Wallabag",
"form.integration.wallabag_tags": "Wallabag Tags",
"form.integration.wallabag_tags": "Ετικέτες Wallabag",
"form.integration.webhook_activate": "Ενεργοποίηση Webhooks",
"form.integration.webhook_secret": "Μυστικό Webhooks",
"form.integration.webhook_url": "Προεπιλεγμένη διεύθυνση URL Webhook",
Expand Down Expand Up @@ -436,7 +436,7 @@
"page.about.title": "Περί",
"page.about.version": "Έκδοση:",
"page.add_feed.choose_feed": "Επιλέξτε μια συνδρομή",
"page.add_feed.label.url": "URL",
"page.add_feed.label.url": "Διεύθυνση URL",
"page.add_feed.legend.advanced_options": "Προχωρημένες Επιλογές",
"page.add_feed.no_category": "Δεν υπάρχει κατηγορία. Πρέπει να έχετε τουλάχιστον μία κατηγορία.",
"page.add_feed.submit": "Βρείτε μια συνδρομή",
Expand All @@ -446,7 +446,7 @@
"page.api_keys.table.created_at": "Ημερομηνία Δημιουργίας",
"page.api_keys.table.description": "Περιγραφή",
"page.api_keys.table.last_used_at": "Τελευταία Χρήση",
"page.api_keys.table.token": "Token",
"page.api_keys.table.token": "Διακριτικό",
"page.api_keys.title": "Κλειδιά API",
"page.categories.entries": "Άρθρα",
"page.categories.feed_count": [
Expand Down Expand Up @@ -478,14 +478,14 @@
"page.feeds.next_check": "Επόμενος έλεγχος:",
"page.feeds.read_counter": "Αριθμός αναγνωσμένων καταχωρήσεων",
"page.feeds.title": "Ροές",
"page.footer.elevator": "Back to top",
"page.footer.elevator": "Επιστροφή στην κορυφή",
"page.history.title": "Ιστορικό",
"page.import.title": "Εισαγωγή",
"page.integration.bookmarklet": "Bookmarklet",
"page.integration.bookmarklet": "Σελιδοδείκτης (bookmarklet)",
"page.integration.bookmarklet.help": "Αυτός ο ειδικός σύνδεσμος σάς επιτρέπει να εγγραφείτε απευθείας σε έναν ιστότοπο χρησιμοποιώντας ένα σελιδοδείκτη στο πρόγραμμα περιήγησης ιστού σας.",
"page.integration.bookmarklet.instructions": "Σύρετε και αποθέστε αυτόν τον σύνδεσμο στους σελιδοδείκτες σας.",
"page.integration.bookmarklet.name": "Προσθήκη στο Miniflux",
"page.integration.miniflux_api": "Miniflux API",
"page.integration.miniflux_api": "API του Miniflux",
"page.integration.miniflux_api_endpoint": "Τελικό σημείο API",
"page.integration.miniflux_api_password": "Κωδικός",
"page.integration.miniflux_api_password_value": "Ο κωδικός πρόσβασης του λογαριασμού σας",
Expand Down Expand Up @@ -548,7 +548,7 @@
"page.sessions.table.current_session": "Τρέχουσα Συνεδρία",
"page.sessions.table.date": "Ημερομηνία",
"page.sessions.table.ip": "Διεύθυνση IP",
"page.sessions.table.user_agent": "User Agent",
"page.sessions.table.user_agent": "Πρόγραμμα περιήγησης (User Agent)",
"page.sessions.title": "Συνεδρίες",
"page.settings.link_google_account": "Σύνδεση του λογαριασμό μου Google",
"page.settings.link_oidc_account": "Σύνδεση του λογαριασμού μου %s",
Expand Down
26 changes: 13 additions & 13 deletions internal/locale/translations/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"form.api_key.label.description": "Etiqueta de clave API",
"form.category.hide_globally": "Ocultar artículos en la lista global de no leídos",
"form.category.label.title": "Título",
"form.feed.fieldset.general": "General",
"form.feed.fieldset.general": "Generalidades",
"form.feed.fieldset.integration": "Servicios de terceros",
"form.feed.fieldset.network_settings": "Ajustes de red",
"form.feed.fieldset.rules": "Reglas",
Expand Down Expand Up @@ -245,7 +245,7 @@
"form.integration.linkace_activate": "Guardar artículos en LinkAce",
"form.integration.linkace_api_key": "Clave API de LinkAce",
"form.integration.linkace_check_disabled": "Deshabilitar la comprobación de enlace",
"form.integration.linkace_endpoint": "LinkAce API Endpoint",
"form.integration.linkace_endpoint": "Extremo de la API de LinkAce",
"form.integration.linkace_is_private": "Marcar enlace como privado",
"form.integration.linkace_tags": "Etiquetas de LinkAce",
"form.integration.linkding_activate": "Enviar artículos a Linkding",
Expand All @@ -254,9 +254,9 @@
"form.integration.linkding_endpoint": "Acceso API de Linkding",
"form.integration.linkding_tags": "Etiquetas de Linkding",
"form.integration.linktaco_activate": "Guardar entradas en LinkTaco",
"form.integration.linktaco_api_token": "LinkTaco API Token",
"form.integration.linktaco_api_token": "Token de la API de LinkTaco",
"form.integration.linktaco_api_token_hint": "Obtenga su token de acceso personal en",
"form.integration.linktaco_org_slug": "Organization Slug",
"form.integration.linktaco_org_slug": "Slug de la organización",
"form.integration.linktaco_tags": "Etiquetas (máx. 10, separadas por comas)",
"form.integration.linktaco_tags_hint": "Máximo 10 etiquetas, separadas por comas",
"form.integration.linktaco_visibility": "Visibilidad",
Expand All @@ -266,7 +266,7 @@
"form.integration.linkwarden_activate": "Enviar artículos a Linkwarden",
"form.integration.linkwarden_api_key": "Clave de API de Linkwarden",
"form.integration.linkwarden_endpoint": "URL base de Linkwarden",
"form.integration.linkwarden_collection_id": "Linkwarden Collection ID",
"form.integration.linkwarden_collection_id": "ID de colección de Linkwarden",
"form.integration.matrix_bot_activate": "Transferir nuevos artículos a Matrix",
"form.integration.matrix_bot_chat_id": "ID de la sala de Matrix",
"form.integration.matrix_bot_password": "Contraseña para el usuario de Matrix",
Expand All @@ -278,7 +278,7 @@
"form.integration.ntfy_activate": "Enviar artículos a ntfy",
"form.integration.ntfy_api_token": "Token de API de Ntfy (opcional)",
"form.integration.ntfy_icon_url": "URL del icono de Ntfy (opcional)",
"form.integration.ntfy_internal_links": "Use internal links on click (optional)",
"form.integration.ntfy_internal_links": "Usar enlaces internos al hacer clic (opcional)",
"form.integration.ntfy_password": "Contraseña de Ntfy (opcional)",
"form.integration.ntfy_topic": "Tema Ntfy (por defecto, si no se establece en el feed)",
"form.integration.ntfy_url": "URL de Ntfy (opcional, la predeterminada es ntfy.sh)",
Expand All @@ -301,18 +301,18 @@
"form.integration.raindrop_activate": "Guardar artículos en Raindrop",
"form.integration.raindrop_collection_id": "Colección ID",
"form.integration.raindrop_tags": "Etiquetas (separadas por comas)",
"form.integration.raindrop_token": "(Test) Token",
"form.integration.raindrop_token": "Token (prueba)",
"form.integration.readeck_activate": "Enviar artículos a Readeck",
"form.integration.readeck_api_key": "Clave de API de Readeck",
"form.integration.readeck_endpoint": "Acceso API de Readeck",
"form.integration.readeck_labels": "Etiquetas de Readeck",
"form.integration.readeck_only_url": "Enviar solo URL (en lugar de contenido completo)",
"form.integration.readeck_push_activate": "Automatically push new entries to Readeck",
"form.integration.readeck_push_activate": "Enviar automáticamente nuevas entradas a Readeck",
"form.integration.readwise_activate": "Guardar artículos en Readwise Reader",
"form.integration.readwise_api_key": "Token de acceso a Readwise Reader",
"form.integration.readwise_api_key_link": "Obtener tu token de acceso a Readwise",
"form.integration.rssbridge_activate": "Vericar RSS-Bridge al agregar suscripciones",
"form.integration.rssbridge_token": "RSS-Bridge authentication token",
"form.integration.rssbridge_token": "Token de autenticación de RSS-Bridge",
"form.integration.rssbridge_url": "URL del servidro RSS-Bridge",
"form.integration.shaarli_activate": "Guardar artículos en Shaarli",
"form.integration.shaarli_api_secret": "Secreto API de Shaarli",
Expand All @@ -329,15 +329,15 @@
"form.integration.telegram_bot_disable_web_page_preview": "Deshabilitar la vista previa de la página web",
"form.integration.telegram_bot_token": "Token de bot",
"form.integration.telegram_chat_id": "ID de chat",
"form.integration.telegram_topic_id": "Topic ID",
"form.integration.telegram_topic_id": "ID de tema",
"form.integration.wallabag_activate": "Enviar artículos a Wallabag",
"form.integration.wallabag_client_id": "ID de cliente de Wallabag",
"form.integration.wallabag_client_secret": "Secreto de cliente de Wallabag",
"form.integration.wallabag_endpoint": "URL base de Wallabag",
"form.integration.wallabag_only_url": "Enviar solo URL (en lugar de contenido completo)",
"form.integration.wallabag_password": "Contraseña de Wallabag",
"form.integration.wallabag_username": "Nombre de usuario de Wallabag",
"form.integration.wallabag_tags": "Wallabag Tags",
"form.integration.wallabag_tags": "Etiquetas de Wallabag",
"form.integration.webhook_activate": "Habilitar Webhooks",
"form.integration.webhook_secret": "Secreto de Webhooks",
"form.integration.webhook_url": "Defecto URL de Webhook",
Expand Down Expand Up @@ -428,7 +428,7 @@
"page.about.build_date": "Fecha de compilación:",
"page.about.credits": "Créditos",
"page.about.db_usage": "Tamaño de la base de datos:",
"page.about.git_commit": "Git Commit:",
"page.about.git_commit": "Commit de Git:",
"page.about.global_config_options": "Opciones de configuración global",
"page.about.go_version": "Go versión:",
"page.about.license": "Licencia:",
Expand Down Expand Up @@ -478,7 +478,7 @@
"page.feeds.next_check": "Próxima verificación:",
"page.feeds.read_counter": "Número de artículos leídos",
"page.feeds.title": "Fuentes",
"page.footer.elevator": "Back to top",
"page.footer.elevator": "Volver arriba",
"page.history.title": "Historial",
"page.import.title": "Importar",
"page.integration.bookmarklet": "Marcapáginas",
Expand Down
Loading
Loading
0