我有一个HTTPS网站,我想减少这个网站的SSL时间.SSL证书已安装在AWS ELB上.
如果我从荷兰访问该网站,则SSL时间很长,但如果我从其他国家访问同一网站,则SSL时间很短.这是为什么?
我基本上试图最小化此页面中显示的时间
http://tools.pingdom.com/fpt/#!/ed9oYJ/https://www.google.com/index.html
有人能告诉我 SonarQube 和 Fortify 有什么区别吗?两者都是静态代码分析工具。我发现 Fortify 更倾向于安全性,因为它提供了有关 OWASP、SANS 等中包含的漏洞的信息。 SonarQube 也显示了这些信息。
目前,我正面临着在NGINX中启用内容类型的一些问题.您可以在nginx.conf中看到默认内容类型是application/octet-stream.
我在NGINX中配置了5个虚拟主机,我想用Content-Type application/json提供所有json文件.
我添加了"application/json json;" 在mime.type文件中并重新启动了nginx服务,但是当我访问任何json文件时,它仍然是由content-type application/octet-stream来的.
我还需要做什么来将JSON文件作为application/json提供吗?
### curl -v http://www.ajay.com/abc/def/ghi/jkl/mno.json
* Hostname was NOT found in DNS cache
* Trying xx.xx.xx.xx...
* Connected to www.ajay.com (xx.xx.xx.xx) port 80 (#0)
> GET abc/def/ghi/jkl/mno.json HTTP/1.1
> User-Agent: curl/7.36.0
> Host: www.ajay.com
> Accept: */*
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Cache-Control: max-age=86400
< **Content-Type: application/octet-stream**
< Date: Tue, 29 Jul 2014 17:03:53 GMT
< ETag: "ab9b7b2c58d3a481e172aea95b1e87a0"
< Expires: Wed, 30 Jul 2014 17:03:53 GMT
< Last-Modified: …Run Code Online (Sandbox Code Playgroud) 我在 AWS API Gateway 中创建了一个 API。在该 API 中,我使用自定义 http 端点创建了一个代理资源。但是当我访问 API 网关端点https://2r3g3ttr6y.execute-api.eu-east-1.amazonaws.com/production/abc/abc.html 时,它不工作,而原始 HTTP 端点工作得很好。
我得到{"message":"Forbidden"}回应。这是设置:
注意:上述 API 端点只是一个虚拟端点。
我有一个 GKE 集群,它使用 AWS ECR 存储库来拉取 docker 镜像。这些是我遵循的步骤。
使用此命令创建了一个秘密
# cat > /tmp/image-pull-secret.yaml << EOF
apiVersion: v1
kind: Secret
metadata:
name: myregistrykey
data:
.dockerconfigjson: $(aws ecr get-authorization-token --output json | jq -n 'input.authorizationData | {auths: (reduce .[] as $d ({}; . + {($d.proxyEndpoint|sub("https?://";"")): {auth:$d.authorizationToken}}))}' | (base64 -w0 2>/dev/null || base64) )
type: kubernetes.io/dockerconfigjson
EOF
# kubectl apply -f /tmp/image-pull-secret.yaml
Run Code Online (Sandbox Code Playgroud)
创建了部署但出现错误
# cat abc_deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: abc-deployment
labels:
app: abc
env: development
spec:
replicas: 3
selector:
matchLabels: …Run Code Online (Sandbox Code Playgroud) amazon-web-services docker google-cloud-platform kubernetes google-kubernetes-engine
我正在尝试在 Jenkins 中打印一个变量。但是我收到一条错误消息,说“替换不当”。我正在使用 Jenkinsfile 来实现这一点。这就是我正在做的。
static def printbn() {
sh '''
#!/usr/bin/env bash
echo \"${env.BUILD_NUMBER}\"
'''
}
pipeline {
agent any
stages {
stage('Print Build Number') {
steps {
printbn()
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我得到的错误
/var/lib/jenkins/workspace/groovymethod@tmp/durable-7d9ef0b0/script.sh: line 4: ${steps.env.BUILD_NUMBER}: bad substitution
Run Code Online (Sandbox Code Playgroud)
注意:我使用的是 Jenkins 版本 Jenkins ver. 2.163
我正在尝试引用我的注释值。我正在尝试这样
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ printf "%s" $value | quote }}
{{- end }}
Run Code Online (Sandbox Code Playgroud)
和这个
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: "{{ $value }}"
{{- end }}
Run Code Online (Sandbox Code Playgroud)
这是我的 values.yaml
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/force-ssl-redirect: false
Run Code Online (Sandbox Code Playgroud)
但它不起作用。即使我双引号 values.yaml 中的注释值 helm 也会删除引号。有人可以告诉我如何在注释中使用双引号值来掌舵吗?
我正在使用 Helm 版本 3。
我登录到 AWS ECR 存储库并触发了 pull 命令,但出现了此错误
# $(aws ecr get-login --no-include-email)
Login Succeeded
# docker pull 432354543235.dkr.ecr.us-east-1.amazonaws.com/abc-example:1.1.1
Pulling repository 432354543235.dkr.ecr.us-east-1.amazonaws.com/abc-example:1.1.1
unauthorized: authentication required
Run Code Online (Sandbox Code Playgroud) 我的 terraform 脚本中有以下代码
variable "sg_ingress_rules" {
type = map(map(any))
default = {
port_22 = { from = 22, to = 22, proto = "tcp", cidr = "0.0.0.0/0", desc = "Allow port 22 from all" }
port_3306 = { from = 3306, to = 3306, proto = "tcp", cidr = "10.0.0.0/8", desc = "Allow port 3306 from all" }
port_3307 = { from = 3307, to = 3307, proto = "tcp", cidr = "10.0.0.0/8", desc = "Allow port 3307 from all" …Run Code Online (Sandbox Code Playgroud) amazon-web-services terraform terraform-provider-aws terraform0.12+
我在下面有这个 Jenkinsfile,我正在尝试运行,但不知何故它抛出"java.lang.NullPointerException: Cannot invoke method printpn() on null object"错误。有人可以检查我错过了什么吗?
[jimmy@localhost]$ cat Jenkinsfile
#!groovy
pipeline {
agent any
stages {
stage('Load Groovy') {
steps {
script {
def func1 = load('prop.groovy')
func1.printpn()
}
}
}
}
}
[jimmy@localhost]$ cat prop.groovy
def printpn() {
sh """#!/usr/bin/env bash
echo "Coming from groovy function."
"""
}
Run Code Online (Sandbox Code Playgroud) docker ×2
groovy ×2
jenkins ×2
kubernetes ×2
amazon-ecr ×1
api-gateway ×1
content-type ×1
devops ×1
fortify ×1
https ×1
json ×1
nginx ×1
performance ×1
security ×1
sonarqube ×1
ssl ×1
terraform ×1
web ×1