amazon-web-services - AWS API Gateway 403 Forbidden response OPTIONS
问题描述
I am trying to call API of AWS through JEE and I got this error in the Chrome Console
[![enter image description here][1]][1] But when I call same API from postman or when I use it in localhost it works.
Whats wrong ?
解决方案
In your API Gateway OPTIONS method, go into Method Response and add a response header with the name 'Access-Control-Allow-Origin'.
Now go into Integration Response, expand the default 200 response and in Header Mappings put the URL of your DNS. If you don't want to restrict by URL, just put a *.
You may need to add this configuration to other methods as well.
推荐阅读
- wordpress - Woocommerce 我的帐户页面侧边栏仅以网站的主要语言可见,以第二语言不可见
- c# - 如何创建匿名对象作为 LINQ 表达式
- java - Kotlin 中的 Java 接口对象
- python - 在日期框中查找单元格的索引
- python - 如何在 Falcon Request 对象中获取 client_addr?
- powerbi - PowerBI DAX 使用 GROUP BY 获取 COUNT DISTINCT,请参阅下面的 SQL 查询
- google-apps-script - Get current user inside getData of Datastudio community connector
- haxe - “结构有额外字段”错误背后的原因是什么
- c# - Fluent ftp 获取最新文件并下载
- python - 如何在 Python 中将列表作为参数传递和访问