1: 首先设置nginx服务器支持跨域,如下
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
}
2:打开aws的cdn,选择源,进行编辑,在底部 "源自定义标头标头名称"添加如下内容:
Access-Control-Allow-Methods GET
Access-Control-Allow-Origin *
3: 选择行为,编辑
1)"允许的 HTTP 方法" "GET、HEAD、OPTIONS"
2) "缓存的 HTTP 方法" "OPTIONS"
3) "基于选择的请求标头进行缓存白" 白名单
4)"白名单标头" Origin
分享到:
相关推荐
本脚本用于清除AWS上的CDN(即cloudfront)的缓存 使CDN缓存过期,重新回源拉去
文件过期前从 CloudFront 边缘缓存中删除文件 通过边缘缓存使文件失效。查看器下次请求文件时,CloudFront 将返回源以获取文件的最新版本。
[AWS][教學]_AWS基本使用#26.__CDN介紹,使用AWS_CloudFront
目录 Amazon Aurora 迁移手册.pdf Amazon Aurora 入门.pdf Amazon DynamoDB 与 Apache HBase for NoSQL 的使用对比.pdf Amazon ECS上的微服务架构.pdf AWS CloudHSM 备份安全性.pdf ...AWS 上的跨域解决方案.....
于私有S3存储桶中托管的静态资产的项目,该项目使用AWS CloudFront部署内容交付网络(CDN)。 该项目创建以下资源: AWS::CertificateManager::Certificate - *.<domain> SSL证书 AWS::CloudFront::Distribution ...
MageFM CDN 这是一个Magento CDN模块,用于在需要水平扩展多个Magento实例时使用,从而避免了需要s3fs,... 为避免权限问题,请使用以下策略: { "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt139328841500
皮带供应商上载aws-s3 这个专案是官方trapi s3上载API的分支,并新增了CDN和prerfix支援程式码。构型您的配置将传递给提供程序。 (例如: new AWS.S3(config) )。 您可以在查看选项的完整列表有关安装和使用提供...
AWS CDN图层Terraform模块Terraform模块,该模块创建用于在AWS上托管Web CDN的资源。用法module " main " { source = " genstackio/layer-cdn/aws " // ...}
AWS Billing and Amazon CDN Service Chapter 11. Analyzing Big Data with AWS Chapter 12. Miscellaneous Features, AWS Security, and Troubleshooting Chapter 13. Building Applications and AWS Best ...
AWS SA认证 官方习题答案
AWS Certified Developer – Associate 考试面向以下个人:担任开发职位并具有一年到多年开发和维护基于 AWS 的应用程序的实践经验。 通过认证验证的能力 •理解核心 AWS 服务、使用方法和基本 AWS 架构最佳实践 ...
AWS上的各个大数据分析选项pdf AWS上的数据仓库pdf AWS上的部署选项概述pdf AWS上的金融服务网格计算pdf AWS云数据迁移服务概述pdf Amazon Aurora MySQL数据库管理员手册:连接管理pdf Amazon Aurora入门pdf Amazon ...
AWS白皮书 The focus of this paper is the operational excellence pillar of the Amazon Web Services (AWS) Well-Architected Framework. It provides guidance to help you apply best practices in the design,...
1,C++版本的现代化AWS SDK调用API接口,具有普遍可用性 2,压缩包中是从github下载的aws-sdk-cpp-1.11.4编译后的可安装二次开发包,windows x86版本,包含以下内容: aws-cpp-sdk-core.dll(和其余dll) aws-cpp-...
#AWS 技术分享# AWS 300 本白皮书,免费开放下载![话筒] AWS 白皮书由 AWS 团队以及众多行业大佬和资深大牛共同创作,内容涵盖【行业解决方案】、【AWS 安全性】、【框架和方法】、【云计算经济学】等诸多主题!...
aws-iot-examples, 使用AWS物联网的例子( 物联网) aws-iot-examples使用AWS物联网的例子( 物联网)mqttSample: 使用MQTT-over-WebSockets将web应用程序连接到AWS物联网的参考实现truckSimulator: 模拟因特网连接的...
Validate your AWS skills. This is your opportunity to take the next step in your career by expanding and validating your skills on the AWS cloud. AWS has been the frontrunner in cloud computing ...
AWS云计算——AWS操作指南系列视频课程【AWS资深技术讲师团队】课件资料
赠送jar包:aws-java-sdk-core-1.12.160.jar; 赠送原API文档:aws-java-sdk-core-1.12.160-javadoc.jar; 赠送源代码:aws-java-sdk-core-1.12.160-sources.jar; 赠送Maven依赖信息文件:aws-java-sdk-core-1.12....
aws安全白皮书aws安全白皮书aws安全白皮书aws安全白皮书aws安全白皮书aws安全白皮书aws安全白皮书aws安全白皮书