projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe96a9d
)
Ignore requests to other hosts.
author
Cheng Zhao
<zcbenz@gmail.com>
Wed, 27 Aug 2014 13:05:54 +0000
(21:05 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Wed, 27 Aug 2014 13:05:54 +0000
(21:05 +0800)
atom/browser/lib/chrome-extension.coffee
patch
|
blob
|
history
diff --git
a/atom/browser/lib/chrome-extension.coffee
b/atom/browser/lib/chrome-extension.coffee
index
3a62da5
..
6ca1bc1
100644
(file)
--- a/
atom/browser/lib/chrome-extension.coffee
+++ b/
atom/browser/lib/chrome-extension.coffee
@@
-8,7
+8,7
@@
hostPathMap = {}
hostPathMapNextKey = 0
getHostForPath = (path) ->
- key = "extension-#{hostPathMapNextKey}"
+ key = "extension-#{
++
hostPathMapNextKey}"
hostPathMap[key] = path
key
@@
-23,6
+23,8
@@
app.once 'ready', ->
parsed = url.parse request.url
return unless parsed.hostname and parsed.path?
+ return unless /extension-\d+/.test parsed.hostname
+
directory = getPathForHost parsed.hostname
return new protocol.RequestFileJob(path.join(directory, parsed.path))