api - Swagger-UI:504 错误无法满足请求
问题描述
我尝试将 swagger-ui 用于我自己的基于 Az App-Service 的 API。但是执行的时候出错了。
# 下面的 curl 命令在本地工作。
卷曲:
curl -X POST "http://<url>/process?parse_id=00001&cust_id=1503&ou_id=317" \
-H "accept: application/json; charset=utf-8" \
-H "Content-Type: multipart/form-data" \
-F "data=@1503.pdf;type=application/pdf"
回复正文:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: xjQNhgn4qv3q67EQL2HVSP_4gAZLPEv_zHqWlDMFRHlh8FhsGmJoGA==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
响应头:
content-length: 1033
content-type: text/html
date: Tue06 Oct 2020 01:57:25 GMT
server: CloudFront
status: 504
via: 1.1 c151a98c4f38ed859d2924662cc3b841.cloudfront.net (CloudFront)
x-amz-cf-id: XK3OXYTXGK03GGKf_t4shG4X6x8-50_hzSBnWWw_id2-xOldOk4G-A==
x-amz-cf-pop: TPE50-C1
x-cache: Error from cloudfront
解决方案
推荐阅读
- python - html 表格到 csv 刮刀
- regex - 如何在 Google Analytics 中使用 RegEx 排除字符串?
- .net - .NET 框架是否有 System.Runtime.Intrinsics?
- android - 以编程方式设置列表视图项的背景颜色
- vba - 类模块 Outlook VBA 的问题
- excel - 复制文本下方的单元格
- android - 如何在 DrawerLayout 中正确使用 Android 片段?
- javascript - Text Javascript的淡入淡出效果
- database - 如何使用 Gorm 进行预加载
- javascript - 如何先加载文件再执行FileReader