Skip to content

Commit

Permalink
Fix #2335 - If IPFS_HOST is ipfs pass localhost to IPFSJS (#2336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Beacom authored Nov 19, 2018
1 parent a36cbb2 commit 64f594d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/app/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def insert_settings(request):
'profile_id': profile.id if profile else '',
'hotjar': settings.HOTJAR_CONFIG,
'ipfs_config': {
'host': settings.IPFS_HOST,
'host': settings.JS_IPFS_HOST,
'port': settings.IPFS_API_PORT,
'protocol': settings.IPFS_API_SCHEME,
'root': settings.IPFS_API_ROOT,
Expand Down
1 change: 1 addition & 0 deletions app/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@
COLO_ACCOUNT_PRIVATE_KEY = env('COLO_ACCOUNT_PRIVATE_KEY', default='') # TODO

IPFS_HOST = env('IPFS_HOST', default='ipfs.infura.io')
JS_IPFS_HOST = IPFS_HOST if IPFS_HOST != 'ipfs' else 'localhost'
IPFS_SWARM_PORT = env.int('IPFS_SWARM_PORT', default=4001)
IPFS_UTP_PORT = env.int('IPFS_UTP_PORT', default=4002)
IPFS_API_PORT = env.int('IPFS_API_PORT', default=5001)
Expand Down

0 comments on commit 64f594d

Please sign in to comment.