内容 - 安全 - 政策问题(Content-Security-Policy issue)

我在我的htaccess中使用下面的代码但由于某种原因我在控制台中收到错误消息。 知道问题是什么吗?

谢谢,

<IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'self' https://maxcdn.bootstrapcdn.com/ https://oss.maxcdn.com/ https://cdnjs.cloudflare.com https://ajax.googleapis.com https://maps.googleapis.com https://fonts.googleapis.com/ https://www.facebook.com/ https://www.facebook.net/ https://connect.facebook.net https://connect.facebook.com"
</IfModule>

在此处输入图像描述


I'm using the code below in my htaccess but for some reason I'm getting an error message in the console. Any idea what the issue is?

Thanks,

<IfModule mod_headers.c>
Header set Content-Security-Policy "script-src 'self' https://maxcdn.bootstrapcdn.com/ https://oss.maxcdn.com/ https://cdnjs.cloudflare.com https://ajax.googleapis.com https://maps.googleapis.com https://fonts.googleapis.com/ https://www.facebook.com/ https://www.facebook.net/ https://connect.facebook.net https://connect.facebook.com"
</IfModule>

enter image description here


原文:https://stackoverflow.com/questions/37049368
2023-04-24 13:04

满意答案

在我的档案中找到了这个。 不知道它何时被写入,是否有效,或者是否仍然支持此接口。 你没有说你正在使用的PSQL版本,所以我甚至不知道这是否适用于你的版本。

import pervasive.database.*;

public class VersionTest implements Consts
{
public VersionTest()
{
try
{
Session session = Driver.establishSession(); 
Database db = session.connectToDatabase("PMKE:"); 
XCursor xcursor = db.createXCursor(57000); 
//Using local TABL.DAT (length 255 assures no leftovers!)
xcursor.setKZString(0,255,"plsetup\\tabl.dat");
//Open the file to load local MKDE
int status = xcursor.BTRV(BTR_OPEN);
System.out.println("Local Open status: " + status);
//Using remote TABL.DAT (length 255 assures no leftovers!)

xcursor.setKZString(0,255,"h:\\basic2c\\develop\\tabl.dat");
//set the buffer size
xcursor.setDataSize(15);
//get version 
status = xcursor.BTRV(BTR_VERSION);
System.out.println("Version status: " + status);
// should be 15, always prints 5
System.out.println("Version length: " + xcursor.getRecLength());
System.out.println("Version: " + xcursor.getDString(0,15));

// try with an open file on a server
XCursor xcursor2 = db.createXCursor(57000); 
//Using remote TABL.DAT (length 255 assures no leftovers!)

xcursor2.setKZString(0,255,"h:\\basic2c\\develop\\tabl.dat");
//Open the file
status = xcursor2.BTRV(BTR_OPEN);
System.out.println("Remote Open status: " + status);
//set the buffer size
xcursor2.setDataSize(15);
//get version 
status = xcursor2.BTRV(BTR_VERSION);
System.out.println("Version status: " + status);
// should be 15, always prints 5
System.out.println("Version length: " + xcursor2.getRecLength());
System.out.println("Version: " + xcursor2.getDString(0,15));

// clean up resources 
Driver.killAllSessions();
}catch(Exception exp)
{
exp.printStackTrace();
}
}
public static void main(String[] args) 
{
new VersionTest();
}
}

Found this in my archives. Don't know when it was written, whether it works, or if this interface is still supported. You don't say what version of PSQL you're using so I don't even know if this will work with your version.

import pervasive.database.*;

public class VersionTest implements Consts
{
public VersionTest()
{
try
{
Session session = Driver.establishSession(); 
Database db = session.connectToDatabase("PMKE:"); 
XCursor xcursor = db.createXCursor(57000); 
//Using local TABL.DAT (length 255 assures no leftovers!)
xcursor.setKZString(0,255,"plsetup\\tabl.dat");
//Open the file to load local MKDE
int status = xcursor.BTRV(BTR_OPEN);
System.out.println("Local Open status: " + status);
//Using remote TABL.DAT (length 255 assures no leftovers!)

xcursor.setKZString(0,255,"h:\\basic2c\\develop\\tabl.dat");
//set the buffer size
xcursor.setDataSize(15);
//get version 
status = xcursor.BTRV(BTR_VERSION);
System.out.println("Version status: " + status);
// should be 15, always prints 5
System.out.println("Version length: " + xcursor.getRecLength());
System.out.println("Version: " + xcursor.getDString(0,15));

// try with an open file on a server
XCursor xcursor2 = db.createXCursor(57000); 
//Using remote TABL.DAT (length 255 assures no leftovers!)

xcursor2.setKZString(0,255,"h:\\basic2c\\develop\\tabl.dat");
//Open the file
status = xcursor2.BTRV(BTR_OPEN);
System.out.println("Remote Open status: " + status);
//set the buffer size
xcursor2.setDataSize(15);
//get version 
status = xcursor2.BTRV(BTR_VERSION);
System.out.println("Version status: " + status);
// should be 15, always prints 5
System.out.println("Version length: " + xcursor2.getRecLength());
System.out.println("Version: " + xcursor2.getDString(0,15));

// clean up resources 
Driver.killAllSessions();
}catch(Exception exp)
{
exp.printStackTrace();
}
}
public static void main(String[] args) 
{
new VersionTest();
}
}

相关问答

更多

为什么使用JCL UNITVERSIONING?(Why use JCL UNITVERSIONING?)

它支持JclUnitVersioning单元,它以更一致的方式公开这些常量: {$IFDEF UNITVERSIONING} const UnitVersioning: TUnitVersionInfo = ( RCSfile: '$URL: https://jcl.svn.sourceforge.net/svnroot/jcl/tags/JCL-1.101- Build2725/jcl/source/common/Jcl8087.pas $'; Revision: '$...

从JCL批次调用CICS程序(Calling CICS program from JCL batch)

是。 从技术上讲,COBOL批处理程序正在与CICS进行通信,并且您将从JCL执行COBOL批处理程序。 您可以在CICS Transaction Server手册中阅读更多内容。 外部CICS®接口是一个应用程序编程接口,它使MVS™中运行的非CICS程序(客户端程序)能够调用运行在CICS区域中的程序(服务器程序),并通过通讯区。 CICS应用程序被调用,就好像被另一个CICS应用程序链接一样。 外部CICS接口简介 我相信你的CICS程序不能使用地图(必须是会话式的),但是我已经和CICS合...

符号JCL混乱(Symbolic JCL Confusion)

符号参数是以“&”符号开头的名称。 在JCL语句中使用时,它们会在运行时转换为提供的值。 创建它们的一种方式(在z / OS上)是使用a // SET name = value 宣言。 如果你使用PARM,你应该设计你的程序,以便它可以与一个工作。 也许该任务是关于如何做到这一点 (提示:联动部分)。 或者JCL是你的COBOL类的一部分? TEST和APOST在我看来像编译器指令。 我不知道您是否可以在您的程序中指定它们,在我的工作场所我们只在调用编译器时提供它们。 编辑: 好的,这对我来说有点...

是否需要在我的JCL中指定所有文件?(Do all files need to be specified in my JCL?)

说到IBM的大型机-COBOL:不,如果你从不OPEN文件,则不需要DD语句。 您也可以尝试打开它并查看生成的FILE-STATUS以查看文件是否存在,如果不存在则采取适当的操作。 Somtimes COBOL在打开时甚至可能会分配一个丢失的文件。 在语言环境下,行为由运行时选项CBLQDA的值决定:如果它处于ON状态,COBOL将自动分配任何为输出而打开但未在JCL中定义的文件(并在程序运行后将其删除,从而抛出取走写入该文件的所有数据)。 Speaking for IBM's mainframe...

如何找到JCL MSGCLASS =?(How to find JCL MSGCLASS=?)

关键问题是ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT 。 假设你在这里正确地转录了你的JCL,你输入: //SYSIN DD * SORT FIELDS=(1,75,CH,A) /* 在这种情况下,您向SORT提交了一个空输入流,因为SORT FIELDS=(1,75,CH,A)被视为DD语句的注释。 你应该输入: //SYSIN DD * SORT FIELDS=(1,75,CH,A) /* The key problem is I...

actian JCL的例子(actian JCL example)

在我的档案中找到了这个。 不知道它何时被写入,是否有效,或者是否仍然支持此接口。 你没有说你正在使用的PSQL版本,所以我甚至不知道这是否适用于你的版本。 import pervasive.database.*; public class VersionTest implements Consts { public VersionTest() { try { Session session = Driver.establishSession(); Database db = session.c...

多行JCL IF声明(JCL IF statement on multiple lines)

根据z / OS MVS JCL语法参考 : //[name] IF [(]relational-expression[)] THEN [comments] . . action when relational-expression is true . //[name] ELSE [comments] . . action when relational-expression is false . //[name] ENDIF ...

什么是jcl2中的ARCIMSG参数?(what is ARCIMSG parameter in jcl2?)

这是要执行的PROCEDURE (编目或插入)的名称。 如果它是instream,它将在JOB本身内编码。 如果已对其进行编目,则该过程将位于其中一个可访问的库中,成员名称将为ARCIMSG 。 如果JCL包含JCLLIB语句,则可以指示库。 ARCIMSG过程将包含此时包含(复制)的JCL。 This is name of the PROCEDURE (cataloged or instream) that is to be executed. If it is instream it will...

如何调试JCL(How to debug JCL)

你实际上没有JCL问题。 首先,要处理MAXCC,因为这会引起很多混乱。 对于有经验的人,MAXCC仅存在于IDCAMS(用于文件和目录操作的实用程序,定义VSAM文件以及与这些类型的事物相关的内容)中。 MAXCC不存在于JCL中,也不存在于JOB中的任何输出中。 MAXCC的来源是你的JOB卡上的NOTIFY声明。 我们已经看到通知多次到达,我们从未读过它,但确实显示了MAXCC。 只是MAXCC只出现在IDCAMS和NOTIFY中,所以告诉我们它是什么会让很多人感到困惑。 CC位是条件代码。...

如何使用JCL在我的新成员中获取文本(How to get text in my new member using JCL)

如果要在现有 JCL数据集中创建新成员 ,请尝试: //STEP1 EXEC PGM=IEBGENER //SYSUT1 DD * Hello /* //SYSUT2 DD DSN=name.JCL4(MEMBER),DISP=(SHR,KEEP) //SYSIN DD DUMMY /* Disp是指数据集而不是成员 。 所以如果数据集已经存在,你不需要创建它!! 如果你想同时创建一个新的 JCL 数据集和一个成员 ,JCL应该是(你在catlg数据集的地方) //STEP1 ...

相关文章

更多

Apache Tika:通用的内容分析工具

项目介绍 Tika是一个内容分析工具,自带全面的parser工具类,能解析基本所有常见格式的文件,得 ...

WeixinJSBridge share(微信自定义分享内容)

1、WeixinJSBridge share(微信自定义分享内容) 可以自定义分享内容。(在右上角的分 ...

微信分享到朋友圈的内容和图片的定制

// 微信分享到朋友圈的内容和图片的定制(function () { // data for w ...

Nutch 2.2+MySQL+Solr4.2实现网站内容的抓取和索引

原文地址:http://blog.sina.com.cn/s/blog_3c9872d00101p4f ...

微信浏览器自带WeixinJSBridge 指定分享内容

varimgUrl='http://su.bdimg.com/static/superplus/img ...

微信公众帐号开发教程第6篇-文本消息的内容长度限制揭秘

相信不少朋友都遇到过这样的问题:当发送的文本消息内容过长时,微信将不做任何响应。那么到底微信允许的文本 ...

[06] 微信公众帐号开发教程第6篇-文本消息的内容长度限制揭秘

相信不少朋友都遇到过这样的问题:当发送的文本消息内容过长时,微信将不做任何响应。那么到底微信允许的文本 ...

[030] 微信公众帐号开发教程第6篇-文本消息的内容长度限制揭秘(转)

相信不少朋友都遇到过这种问题:当发送的文本消息内容过长时,微信将不做不论什么响应。那么究竟微信同意的文 ...

We7CMS内容管理系统助阵政府完善信息公开制度

政府规定信息公开以来大多数政府都是在摸索中前进,现在系统基本上已经完善了,但是更多的需求来了,信息公开 ...

最新问答

更多

获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)

我用Google搜索了一个解决方案。 “EnumDisplayModeProvider”是我自己设置网站的各种模式的枚举。 public EnumDisplayModeProvider GetDisplayModeId() { foreach (var mode in DisplayModeProvider.Instance.Modes) if (mode.CanHandleContext(HttpContext)) {

如何通过引用返回对象?(How is returning an object by reference possible?)

这相对简单:在类的构造函数中,您可以分配内存,例如使用new 。 如果你制作一个对象的副本,你不是每次都分配新的内存,而是只复制指向原始内存块的指针,同时递增一个也存储在内存中的引用计数器,使得每个副本都是对象可以访问它。 如果引用计数降至零,则销毁对象将减少引用计数并仅释放分配的内存。 您只需要一个自定义复制构造函数和赋值运算符。 这基本上是共享指针的工作方式。 This is relatively easy: In the class' constructor, you allocate m

矩阵如何存储在内存中?(How are matrices stored in memory?)

正如它在“熵编码”中所说的那样,使用Z字形图案,与RLE一起使用,在许多情况下,RLE已经减小了尺寸。 但是,据我所知,DCT本身并没有给出稀疏矩阵。 但它通常会增强矩阵的熵。 这是compressen变得有损的点:输入矩阵用DCT传输,然后量化量化然后使用霍夫曼编码。 As it says in "Entropy coding" a zig-zag pattern is used, together with RLE which will already reduce size for man

每个请求的Java新会话?(Java New Session For Each Request?)

你是如何进行重定向的? 您是否事先调用了HttpServletResponse.encodeRedirectURL()? 在这里阅读javadoc 您可以使用它像response.sendRedirect(response.encodeRedirectURL(path)); The issue was with the path in the JSESSIONID cookie. I still can't figure out why it was being set to the tomca

css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)

我认为word-break ,如果你想在一个单词中打破行,你可以指定它,这样做可以解决问题: .column { word-break:break-all; } jsFiddle演示。 您可以在此处阅读有关word-break属性的更多信息。 I think word-break, with which you can specify if you want to break line within a word, will do the trick: .column { word-break

无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)

我认为您忘记在分类时间内缩放输入图像,如train_test.prototxt文件的第11行所示。 您可能应该在C ++代码中的某个位置乘以该因子,或者使用Caffe图层来缩放输入(请查看ELTWISE或POWER图层)。 编辑: 在评论中进行了一次对话之后,结果发现在classification.cpp文件中错误地删除了图像均值,而在原始训练/测试管道中没有减去图像均值。 I think you have forgotten to scale the input image during cl

xcode语法颜色编码解释?(xcode syntax color coding explained?)

转到: Xcode => Preferences => Fonts & Colors 您将看到每个语法高亮颜色旁边都有一个简短的解释。 Go to: Xcode => Preferences => Fonts & Colors You'll see that each syntax highlighting colour has a brief explanation next to it.

在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)

你考虑过第三方拼写检查吗? 您可以将在C#中开发的自定义WinForms控件插入访问数据库吗? VB6控件怎么样? 如果你能找到一个使用第三方库进行拼写检查的控件,那可能会有效。 Have you considered a third party spell checker? Can you insert a custom WinForms controls developed in C# into an access database? What about a VB6 control? If

从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)

我有同样的问题,因为我在远程服务器上有两个图像,我需要在每天的预定义时间复制到我的本地服务器,这是我能够提出的代码... try { if(@copy('url/to/source/image.ext', 'local/absolute/path/on/server/' . date("d-m-Y") . ".gif")) { } else { $errors = error_get_last(); throw new Exception($err

从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))

我不确定我完全明白你在说什么。 你能编辑你的帖子并包含你正在做的Subversion命令/操作的特定顺序吗? 最好使用命令行svn客户端,以便容易为其他人重现问题。 如果您只是想获取文件的旧副本(即使该文件不再存在),您可以使用如下命令: svn copy ${repo}/trunk/moduleA/file1@${rev} ${repo}/trunk/moduleB/file1 其中${repo}是您的存储库的URL, ${rev}是您想要的文件的版本。 这将恢复该文件的旧版本,包括最高版本