mirror of
https://github.com/iv-org/invidious.git
synced 2026-06-16 20:06:46 -05:00
Rename configuration variable, add additional comment for the option
This commit is contained in:
parent
9140808717
commit
f1f66289da
@ -185,7 +185,6 @@ https_only: false
|
|||||||
# path: /tmp/invidious.sock
|
# path: /tmp/invidious.sock
|
||||||
# permissions: 777
|
# permissions: 777
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Network (outbound)
|
# Network (outbound)
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@ -208,7 +207,6 @@ https_only: false
|
|||||||
##
|
##
|
||||||
#pool_size: 100
|
#pool_size: 100
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## Additional cookies to be sent when requesting the youtube API.
|
## Additional cookies to be sent when requesting the youtube API.
|
||||||
##
|
##
|
||||||
@ -243,7 +241,6 @@ https_only: false
|
|||||||
# host:
|
# host:
|
||||||
# port:
|
# port:
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## Use Innertube's transcripts API instead of timedtext for closed captions
|
## Use Innertube's transcripts API instead of timedtext for closed captions
|
||||||
##
|
##
|
||||||
@ -324,7 +321,6 @@ https_only: false
|
|||||||
##
|
##
|
||||||
#statistics_enabled: false
|
#statistics_enabled: false
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Users and accounts
|
# Users and accounts
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@ -440,6 +436,8 @@ feed_threads: 1
|
|||||||
## Setting to disable easy to abuse API endpoints that can
|
## Setting to disable easy to abuse API endpoints that can
|
||||||
## be spammed and therefore blocking your Invidious instance.
|
## be spammed and therefore blocking your Invidious instance.
|
||||||
##
|
##
|
||||||
|
## Useful for public instance maintainers.
|
||||||
|
##
|
||||||
## Notes: The following API endpoints will be disabled:
|
## Notes: The following API endpoints will be disabled:
|
||||||
## - /api/v1/videos
|
## - /api/v1/videos
|
||||||
## - /api/v1/clips
|
## - /api/v1/clips
|
||||||
@ -448,13 +446,11 @@ feed_threads: 1
|
|||||||
## Accepted values: true, false
|
## Accepted values: true, false
|
||||||
## Default: false
|
## Default: false
|
||||||
##
|
##
|
||||||
disable_api: false
|
disable_abusable_api: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
## Options for the database cleaning job
|
## Options for the database cleaning job
|
||||||
clear_expired_items:
|
clear_expired_items:
|
||||||
|
|
||||||
## Enable/Disable job
|
## Enable/Disable job
|
||||||
##
|
##
|
||||||
## Accepted values: true, false
|
## Accepted values: true, false
|
||||||
@ -464,7 +460,6 @@ jobs:
|
|||||||
|
|
||||||
## Options for the channels updater job
|
## Options for the channels updater job
|
||||||
refresh_channels:
|
refresh_channels:
|
||||||
|
|
||||||
## Enable/Disable job
|
## Enable/Disable job
|
||||||
##
|
##
|
||||||
## Accepted values: true, false
|
## Accepted values: true, false
|
||||||
@ -474,7 +469,6 @@ jobs:
|
|||||||
|
|
||||||
## Options for the RSS feeds updater job
|
## Options for the RSS feeds updater job
|
||||||
refresh_feeds:
|
refresh_feeds:
|
||||||
|
|
||||||
## Enable/Disable job
|
## Enable/Disable job
|
||||||
##
|
##
|
||||||
## Accepted values: true, false
|
## Accepted values: true, false
|
||||||
@ -482,7 +476,6 @@ jobs:
|
|||||||
##
|
##
|
||||||
enable: true
|
enable: true
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@ -681,7 +674,6 @@ default_user_preferences:
|
|||||||
##
|
##
|
||||||
#captions: ["", "", ""]
|
#captions: ["", "", ""]
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Interface
|
# Interface
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@ -783,7 +775,6 @@ default_user_preferences:
|
|||||||
##
|
##
|
||||||
#related_videos: true
|
#related_videos: true
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Video player behavior
|
# Video player behavior
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@ -847,7 +838,6 @@ default_user_preferences:
|
|||||||
##
|
##
|
||||||
#video_loop: false
|
#video_loop: false
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Video playback settings
|
# Video playback settings
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
@ -959,7 +949,6 @@ default_user_preferences:
|
|||||||
##
|
##
|
||||||
#sort: published
|
#sort: published
|
||||||
|
|
||||||
|
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
# -----------------------------
|
# -----------------------------
|
||||||
|
|||||||
@ -181,7 +181,7 @@ class Config
|
|||||||
property playlist_length_limit : Int32 = 500
|
property playlist_length_limit : Int32 = 500
|
||||||
|
|
||||||
# Disable easy to abuse API endpoints
|
# Disable easy to abuse API endpoints
|
||||||
property disable_api : Bool = false
|
property disable_abusable_api : Bool = false
|
||||||
|
|
||||||
def disabled?(option)
|
def disabled?(option)
|
||||||
case disabled = CONFIG.disable_proxy
|
case disabled = CONFIG.disable_proxy
|
||||||
|
|||||||
@ -142,7 +142,7 @@ class DisableAbusableAPIHandler < Kemal::Handler
|
|||||||
{% end %}
|
{% end %}
|
||||||
|
|
||||||
def call(env)
|
def call(env)
|
||||||
return call_next env unless only_match?(env) && CONFIG.disable_api
|
return call_next env unless only_match?(env) && CONFIG.disable_abusable_api
|
||||||
|
|
||||||
env.response.content_type = "application/json"
|
env.response.content_type = "application/json"
|
||||||
env.response.status_code = 403
|
env.response.status_code = 403
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user