Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
78c43fe6
Commit
78c43fe6
authored
Nov 10, 2018
by
Dr Ian Preston
Committed by
Steven Allen
Nov 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move p2p http proxy from api to gateway
License: MIT Signed-off-by:
Ian Preston
<
ianopolous@protonmail.com
>
parent
28652758
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
cmd/ipfs/daemon.go
cmd/ipfs/daemon.go
+7
-6
No files found.
cmd/ipfs/daemon.go
View file @
78c43fe6
...
...
@@ -290,9 +290,9 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
// Start assembling node config
ncfg
:=
&
core
.
BuildCfg
{
Repo
:
repo
,
Permanent
:
true
,
// It is temporary way to signify that node is permanent
Online
:
!
offline
,
Repo
:
repo
,
Permanent
:
true
,
// It is temporary way to signify that node is permanent
Online
:
!
offline
,
DisableEncryptedConnections
:
unencrypted
,
ExtraOpts
:
map
[
string
]
bool
{
"pubsub"
:
pubsub
,
...
...
@@ -467,9 +467,6 @@ func serveHTTPApi(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, error
opts
=
append
(
opts
,
corehttp
.
RedirectOption
(
""
,
cfg
.
Gateway
.
RootRedirect
))
}
if
cfg
.
Experimental
.
P2pHttpProxy
{
opts
=
append
(
opts
,
corehttp
.
ProxyOption
())
}
node
,
err
:=
cctx
.
ConstructNode
()
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"serveHTTPApi: ConstructNode() failed: %s"
,
err
)
...
...
@@ -573,6 +570,10 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
corehttp
.
CommandsROOption
(
*
cctx
),
}
if
cfg
.
Experimental
.
P2pHttpProxy
{
opts
=
append
(
opts
,
corehttp
.
ProxyOption
())
}
if
len
(
cfg
.
Gateway
.
RootRedirect
)
>
0
{
opts
=
append
(
opts
,
corehttp
.
RedirectOption
(
""
,
cfg
.
Gateway
.
RootRedirect
))
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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