Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
interfect
funkwhale
Commits
238d8492
Verified
Commit
238d8492
authored
Apr 08, 2018
by
Eliot Berriot
Browse files
Can now disable SSL cerification for external requests
parent
6c0a43a0
Changes
6
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
238d8492
...
...
@@ -273,3 +273,11 @@ we will default to node1 as the name of your instance.
Assuming your project name is ``node1``, your server will be reachable
at ``https://node1.funkwhale.test/``. Not that you'll have to trust
the SSL Certificate as it's self signed.
When working on federation with traefik, ensure you have this in your ``env``::
# This will ensure we don't bind any port on the host, and thus enable
# multiple instances of funkwhale to be spawned concurrently.
WEBPACK_DEVSERVER_PORT_BINDING=
# This disable certificate verification
EXTERNAL_REQUESTS_VERIFY_SSL=false
api/funkwhale_api/federation/activity.py
View file @
238d8492
...
...
@@ -3,6 +3,8 @@ import json
import
requests_http_signature
import
uuid
from
django.conf
import
settings
from
funkwhale_api.common
import
session
from
.
import
models
...
...
@@ -74,6 +76,7 @@ def deliver(activity, on_behalf_of, to=[]):
json
=
activity
,
url
=
recipient_actor
.
inbox_url
,
timeout
=
5
,
verify
=
settings
.
EXTERNAL_REQUESTS_VERIFY_SSL
,
headers
=
{
'Content-Type'
:
'application/activity+json'
}
...
...
api/funkwhale_api/federation/actors.py
View file @
238d8492
...
...
@@ -32,6 +32,7 @@ def get_actor_data(actor_url):
response
=
session
.
get_session
().
get
(
actor_url
,
timeout
=
5
,
verify
=
settings
.
EXTERNAL_REQUESTS_VERIFY_SSL
,
headers
=
{
'Accept'
:
'application/activity+json'
,
}
...
...
api/funkwhale_api/federation/library.py
View file @
238d8492
import
requests
from
django.conf
import
settings
from
funkwhale_api.common
import
session
from
.
import
actors
...
...
@@ -69,6 +71,7 @@ def get_library_data(library_url):
library_url
,
auth
=
auth
,
timeout
=
5
,
verify
=
settings
.
EXTERNAL_REQUESTS_VERIFY_SSL
,
headers
=
{
'Content-Type'
:
'application/activity+json'
}
...
...
api/funkwhale_api/federation/webfinger.py
View file @
238d8492
...
...
@@ -47,7 +47,10 @@ def get_resource(resource_string):
username
,
hostname
=
clean_acct
(
resource
,
ensure_local
=
False
)
url
=
'https://{}/.well-known/webfinger?resource={}'
.
format
(
hostname
,
resource_string
)
response
=
session
.
get_session
().
get
(
url
,
timeout
=
5
)
response
=
session
.
get_session
().
get
(
url
,
verify
=
settings
.
EXTERNAL_REQUESTS_VERIFY_SSL
,
timeout
=
5
)
response
.
raise_for_status
()
serializer
=
serializers
.
ActorWebfingerSerializer
(
data
=
response
.
json
())
serializer
.
is_valid
(
raise_exception
=
True
)
...
...
api/funkwhale_api/music/views.py
View file @
238d8492
...
...
@@ -219,6 +219,7 @@ class TrackFileViewSet(viewsets.ReadOnlyModelViewSet):
auth
=
auth
,
stream
=
True
,
timeout
=
20
,
verify
=
settings
.
EXTERNAL_REQUESTS_VERIFY_SSL
,
headers
=
{
'Content-Type'
:
'application/activity+json'
})
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment