Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 删除“;X-Content-Type-Options:nosniff“;来自Google存储公共URL的标题_Google Cloud Platform_Google Cloud Storage - Fatal编程技术网

Google cloud platform 删除“;X-Content-Type-Options:nosniff“;来自Google存储公共URL的标题

Google cloud platform 删除“;X-Content-Type-Options:nosniff“;来自Google存储公共URL的标题,google-cloud-platform,google-cloud-storage,Google Cloud Platform,Google Cloud Storage,我的目标是公开提供一个来自Google存储的静态text/javascript文件,作为脚本标记 我遇到以下浏览器错误: "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type. 我卷曲了Google存储URL,发现它的302用有问题的标题X-Content-Type:nosniff将我重定向到另一个包含实际Content-Type:text/javascript文件的链接 有没有办法

我的目标是公开提供一个来自Google存储的静态
text/javascript
文件,作为脚本标记

我遇到以下浏览器错误:

"X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
我卷曲了Google存储URL,发现它的302用有问题的标题
X-Content-Type:nosniff
将我重定向到另一个包含实际
Content-Type:text/javascript
文件的链接


有没有办法防止对公开的文件进行重定向?

更改URL解决了防止Google Storage 302重定向的问题

发件人:

https://storage.cloud.google.com//script.js
致:

https://storage.googleapis.com//script.js

更改URL解决了阻止Google Storage 302重定向的问题

发件人:

https://storage.cloud.google.com//script.js
致:

https://storage.googleapis.com//script.js

是的!storage.cloud.google.com是一个允许您使用google Cookie进行身份验证的域。正如您所能想象的,如果不严格限制,这可能会导致许多跨站点漏洞。storage.googleapis.com不允许cookie身份验证,因此它的权限要大得多。是的!storage.cloud.google.com是一个允许您使用google Cookie进行身份验证的域。正如您所能想象的,如果不严格限制,这可能会导致许多跨站点漏洞。storage.googleapis.com不允许cookie身份验证,因此其权限要大得多。
https://storage.cloud.google.com/<bucket-name>/script.js
https://storage.googleapis.com/<bucket-name>/script.js