Merge pull request #110 from aroben/devtools-security
Make devtools work when web security is enabled
This commit is contained in:
commit
239ddea0ce
1 changed files with 11 additions and 2 deletions
|
@ -42,11 +42,12 @@ std::string GetMimeTypeForPath(const std::string& path) {
|
|||
return "image/png";
|
||||
} else if (EndsWith(filename, ".gif", false)) {
|
||||
return "image/gif";
|
||||
} else if (EndsWith(filename, ".svg", false)) {
|
||||
return "image/svg+xml";
|
||||
} else if (EndsWith(filename, ".manifest", false)) {
|
||||
return "text/cache-manifest";
|
||||
}
|
||||
NOTREACHED();
|
||||
return "text/plain";
|
||||
return "text/html";
|
||||
}
|
||||
|
||||
class BundledDataSource : public content::URLDataSource {
|
||||
|
@ -86,6 +87,14 @@ class BundledDataSource : public content::URLDataSource {
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual bool ShouldDenyXFrameOptions() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual bool ShouldServeMimeTypeAsContentTypeHeader() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual ~BundledDataSource() {}
|
||||
DISALLOW_COPY_AND_ASSIGN(BundledDataSource);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue