Prevent javascript GET and Script
Prevent javascript GET and Script
是否有限制Javascript Get, Post请求到指定的域?我也可以禁用JSONP?
我想开发一个web内容框架,人们可以在不同的页面中包含javascript,但我不希望这些脚本访问任何其他域。
我熟悉firefox的"内容安全策略",但不幸的是,这只适用于firefox。
默认为"禁用"。如果你想"允许"json,你必须添加json回调。没有它,js无法检索json响应。
与其让用户选择任意的javascript,不如让他们从已批准的脚本列表中选择,如果脚本不包含在正确的域中,是否可以拒绝编辑?或者你可以使用某种自定义标记,而不是允许写标签,他们写[include="pluginname"],你自己转换成一个脚本标签,它与给定名称的插件被发现?
内容安全策略在Chrome中也有有限的支持,但目前它并不是你真正想要的,因为它在市场上的支持和渗透是有限的。
相关文章:
- Selenium WebDriver and JavaScript change
- html文件中的script标记根本不起作用
- PHP and Javascript functions
- Javascript Return and if/else
- SetTimeout and clearTimeout in Javascript
- lightbox in html 5 and javascript
- TimelineJS and AngularJS
- timeago.js with datatable and PHP
- javascript button ajax and php
- Ajax and Json with Rails
- 用javascript将script元素附加到头部;铬不能工作
- Combine onload, onresize and onclick
- php布尔值's小写AND大写和数字布尔值'可以接受
- angular-seed web-script.js and cors
- Java script中的OR和AND语句
- google.load and google apps script
- HTML script and javascript
- React dangerouslySetInnerHTML and script tag
- Ubuntu 8.04 Hardy and node.js upstart script
- Prevent javascript GET and Script