Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
24fc1f07
Commit
24fc1f07
authored
Mar 29, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add flag to control CORS header #394
* Disabled on CLI *
http://localhost
on Mist
parent
e1c6c01b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
main.go
cmd/geth/main.go
+1
-0
main.go
cmd/mist/main.go
+7
-0
flags.go
cmd/utils/flags.go
+5
-1
No files found.
cmd/geth/main.go
View file @
24fc1f07
...
...
@@ -233,6 +233,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils
.
VMDebugFlag
,
utils
.
ProtocolVersionFlag
,
utils
.
NetworkIdFlag
,
utils
.
RPCCORSDomainFlag
,
}
// missing:
...
...
cmd/mist/main.go
View file @
24fc1f07
...
...
@@ -47,12 +47,19 @@ var (
Usage
:
"absolute path to GUI assets directory"
,
Value
:
common
.
DefaultAssetPath
(),
}
rpcCorsFlag
=
utils
.
RPCCORSDomainFlag
)
func
init
()
{
// Mist-specific default
if
len
(
rpcCorsFlag
.
Value
)
==
0
{
rpcCorsFlag
.
Value
=
"http://localhost"
}
app
.
Action
=
run
app
.
Flags
=
[]
cli
.
Flag
{
assetPathFlag
,
rpcCorsFlag
,
utils
.
BootnodesFlag
,
utils
.
DataDirFlag
,
...
...
cmd/utils/flags.go
View file @
24fc1f07
...
...
@@ -148,7 +148,11 @@ var (
Usage
:
"Port on which the JSON-RPC server should listen"
,
Value
:
8545
,
}
RPCCORSDomainFlag
=
cli
.
StringFlag
{
Name
:
"rpccorsdomain"
,
Usage
:
"Domain on which to send Access-Control-Allow-Origin header"
,
Value
:
""
,
}
// Network Settings
MaxPeersFlag
=
cli
.
IntFlag
{
Name
:
"maxpeers"
,
...
...
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