标签: https

nginx将HTTPS重定向到HTTP

如何从https重定向到http?

我有下面的代码,但它似乎不起作用.

server {
        listen 443;
        server_name example.com;
        rewrite ^(.*) http://example.com$1 permanent;
 }
Run Code Online (Sandbox Code Playgroud)

https nginx http-redirect

30
推荐指数
3
解决办法
6万
查看次数

使用证书通过https跳过

我在Apache下使用ssl进行soap服务,suds使用gres而不使用ssl.
我有客户端证书(my.crt和user.p12文件).
我需要如何配置suds客户端以使其与https服务一起使用?

没有证书,我明白了

urllib2.URLError: <urlopen error [Errno 1] _ssl.c:499: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure>

python ssl https suds

30
推荐指数
3
解决办法
3万
查看次数

C# - 连接:在HttpWebRequest期间未发送保持活动标头

我正在尝试发送以使用我的HttpWebRequest发送以下标头:

Connection: keep-alive

但是,标头永远不会发送.Fiddler2显示,每当我在Google Chrome中请求该页面时,都会发送标题.但是,我的应用程序由于某种原因拒绝发送此标头.

我已经将KeepAlive属性设置为true(true默认情况下是默认值),但标题仍然没有被发送.

我正在尝试使用多个HttpWebRequests发送此标头,但它们基本上都是这样的:

HttpWebRequest logIn6 = (HttpWebRequest)WebRequest.Create(new Uri(responseFromLogIn5));
logIn6.CookieContainer = cookies;
logIn6.KeepAlive = true;
logIn6.Referer = "https://login.yahoo.com/config/login?.src=spt&.intl=us&.lang=en-US&.done=http://football.fantasysports.yahoo.com/";
logIn6.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1";
logIn6.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
logIn6.Headers.Add("Accept-Encoding:gzip,deflate,sdch");
logIn6.Headers.Add("Accept-Language:en-US,en;q=0.8");
logIn6.Headers.Add("Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3");
logIn6.AllowAutoRedirect = false;

HttpWebResponse logIn6Response = (HttpWebResponse)logIn6.GetResponse();
string responseFromLogIn6 = logIn6Response.GetResponseHeader("Location");

cookies.Add(logIn6Response.Cookies);

logIn6Response.Close();
Run Code Online (Sandbox Code Playgroud)

有谁知道我要做什么来确保这个标题被发送?

来自Chrome的Fiddler2 Raw:

GET xxx HTTP/1.1
Host: accounts.google.com
Connection: keep-alive
Referer: https://login.yahoo.com/config/login?.src=spt&.intl=us&.lang=en-US&.done=http://football.fantasysports.yahoo.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like …
Run Code Online (Sandbox Code Playgroud)

c# https http httpwebrequest http-headers

30
推荐指数
3
解决办法
4万
查看次数

使用HTTPS,请求正文是否保护URL和请求标头?

只是想验证,在进行SSL连接(http post)时说:

https://www.example.com/some/path?customer_key=123123123
Run Code Online (Sandbox Code Playgroud)

如果您不希望任何人知道customer_key,即使我正在建立https连接,这种方法也行不通?

我想要保护的所有数据都必须在请求正文中吗?

security ssl https

30
推荐指数
2
解决办法
2万
查看次数

在IE CSS上,font-face仅在浏览内部链接时有效

我们的webdesigner创建了一个带有以下font-face的CSS:

@font-face {
    font-family: 'oxygenregular';
    src: url('oxygen-regular-webfont.eot');
    src: url('oxygen-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('oxygen-regular-webfont.woff') format('woff'),
         url('oxygen-regular-webfont.ttf') format('truetype'),
         url('oxygen-regular-webfont.svg#oxygenregular') format('svg');
    font-weight: normal;
    font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)

它适用于IE和Firefix.但是有一个问题:在IE上,只有当我使用内部网页链接导航页面时才能正确呈现字体.如果我点击"刷新"或"返回"按钮,则字体将被默认字体(Times New Roman)替换.

目前该网站使用的是HTTPS,但在使用HTTP时遇到了同样的问题.

当我使用内部网站链接导航时,在IE Developer工具的网络选项卡(Shift-F12)中,我看到以下内容:

/Content/oxygen-regular-webfont.eot?    GET 200 application/vnd.ms-fontobject
Run Code Online (Sandbox Code Playgroud)

当我使用刷新/返回按钮时,还有两个其他字体的条目:

/Content/oxygen-regular-webfont.woff    GET 200 application/x-font-woff
/Content/oxygen-regular-webfont.ttf GET 200 application/octet-stream
Run Code Online (Sandbox Code Playgroud)

CSS文件本身以下列方式加载:

/Content/site.css   GET 200 text/css
Run Code Online (Sandbox Code Playgroud)

我试图删除woff和ttf所以我有以下内容:

@font-face {
    font-family: 'oxygenregular';
    src: url('oxygen-regular-webfont.eot');
    src: url('oxygen-regular-webfont.eot?#iefix') format('embedded-opentype');
    font-weight: normal;
    font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)

但仍然IE的行为方式相同(除了它不再下载woff和ttf):在浏览Back/Refresh时显示不正确的回退字体.

如何使IE在刷新/返回操作上加载正确的字体?

css https internet-explorer font-face

30
推荐指数
3
解决办法
1万
查看次数

当Fiddler可以解密时,为什么要使用HTTPS

我刚刚发现Fiddler可以解密HTTPS流量.

例如,我使用HTTPS在localhost上部署了一个网站.在Fiddler中检查数据包时,我能够查看所有信息,因为它可以选择解密它.

我的问题是,当Fiddler可以轻松解密时,为什么要使用HTTPS?

encryption debugging https networking fiddler

30
推荐指数
2
解决办法
3万
查看次数

反向代理的事实标准是什么告诉使用后端SSL?

我有一个反向代理,在外部执行HTTPS,但内部使用HTTP.

这意味着默认情况下,应用程序内URL将使用HTTP作为方案,因为这是它的联系方式.

代理如何告诉后端应该使用HTTPS?

https reverse-proxy http-headers

30
推荐指数
1
解决办法
2万
查看次数

Chrome和IE中的混合内容

在我启用HTTPS的网站中,我添加了一个iframe,该iframe应该显示来自我的其他网站的内容,但它不能在https下运行.

<iframe  src="//myothersite.com"></iframe>
Run Code Online (Sandbox Code Playgroud)

在Firefox最新版本中,一切都很好.

在Chrome中,iframe未加载,在控制台中我看到了这两个错误

Mixed Content: The page at 'https://mysite' was loaded over HTTPS, but requested an insecure resource 'http://myothersite.com'. 
This request has been blocked; the content must be served over HTTPS.
Failed to load resource: net::ERR_CACHE_MISS
Run Code Online (Sandbox Code Playgroud)

在IE内容加载不正确,我看到一个警报消息; 如果我单击"允许不安全内容",则会正确加载.

问题是:我如何在Firefox中使用IE和Chrome(加载混合内容而不发出任何警报)?

注意:我没有更改任何浏览器设置.

security https iframe google-chrome mixed-content

30
推荐指数
2
解决办法
8万
查看次数

如何在目标 prometheus 上添加 https url

我想将我的 HTTPS 目标 URL 添加到 Prometheus,出现如下错误:

"https://myDomain.dev" is not a valid hostname"
Run Code Online (Sandbox Code Playgroud)

我的域可以使用代理通过 Nginx 和端口 9100 访问和运行(基本上我为节点导出器创建了一个域)

我的配置 prometheus.yml

scrape_configs:
  - job_name: 'prometheus'

    static_configs:
    - targets: ['localhost:9090']

  - job_name: 'domain-job'
    static_configs:
    - targets: ['https://myDomain.dev']
Run Code Online (Sandbox Code Playgroud)

还有什么配置需要添加吗?

https prometheus

30
推荐指数
2
解决办法
3万
查看次数

HTTPS如何提供安全性?

我想知道如何实现HTTPS.数据是加密的还是路径是加密的(通过哪些数据传递).如果有人向我提供实施细节,我将感激不尽.

https

29
推荐指数
4
解决办法
2万
查看次数