似乎建议使用无方案URI,这样您就永远不会在浏览器中触发混合模式错误,但是如果引用了scheme-,似乎不可能在Visual Studio 2019中发布网站。 _Layout.cshtml中的URI更少。
此代码包含jQuery:
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
awx-cache-5c44475fcc-rfwvj 1/1 Running 0 41m 10.244.2.75 hs2-inf-v-ans07 <none> <none>
awx-db-59789d55b9-tzlck 0/1 Pending 0 41m <none> <none> <none> <none>
awx-queue-7db5697f96-q46wk 1/1 Running 0 41m 10.244.2.76 hs2-inf-v-ans07 <none> <none>
awx-task-69dfcc4d5f-qz7gx 1/1 Running 0 41m 10.244.2.77 hs2-inf-v-ans07 <none> <none>
awx-web-5669b4f766-j95lq 1/1 Running 0 41m 10.244.2.78 hs2-inf-v-ans07 <none> <none>
[root@hs2-inf-v-ans09 ~]#
但是尝试发布站点失败,并出现以下错误:
[root@hs2-inf-v-ans09 ~]# kubectl describe pods awx-db-59789d55b9-tzlck
Name: awx-db-59789d55b9-tzlck
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: <none>
Labels: app=awx
pod-template-hash=59789d55b9
role=database
Annotations: <none>
Status: Pending
IP:
Controlled By: ReplicaSet/awx-db-59789d55b9
Containers:
postgres:
Image: postgres:9.6
Port: 5432/TCP
Host Port: 0/TCP
Environment:
POSTGRES_DB: awx
POSTGRES_PASSWORD: awxpass
POSTGRES_USER: awx
PGDATA: /var/lib/postgresql/data/pgdata
Mounts:
/var/lib/postgresql/data from data-volume (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-2gqld (ro)
Conditions:
Type Status
PodScheduled False
Volumes:
data-volume:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: awx-db
ReadOnly: false
default-token-2gqld:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-2gqld
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 2m1s (x50 over 72m) default-scheduler pod has unbound immediate PersistentVolumeClaims
[root@hs2-inf-v-ans09 ~]#
如果我在<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" crossorigin="anonymous">
</script>
之前添加Warning TS6053 (JS) File '//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js' not found.
,则它将正确发布。
这是错误还是不建议使用无方案URI?从网上看,似乎最早支持IE3的浏览器都支持此功能。
答案 0 :(得分:0)
似乎错误是因为我第四次关闭并重新打开它时,Visual Studio出现了问题(添加https:
并保存并生成,然后关闭,然后重新打开并删除{{1} },然后再次构建和发布),它不再遇到无方案URI的问题并成功发布。