higress
higress copied to clipboard
[frontend-gray]插件支持在特定Path下返回指定HTML
Why do you need it?
当前mock场景下无法返回HTML格式的文件,返回的格式为text/plain。在某些业务场景下需要在特定path下返回某个页面,因此期望可以支持返回HTML格式的数据
How could it be?
mockHtml:
- path:
- "a"
- "mock"
html: |-
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MFE 微前端应用: App1</title>
</head>
<body>
<div class="container">
<h1>MFE 微前端应用: App1</h1>
<script src="./js/a.js"></script>
</div>
</body>
</html>
Other related information
Add any other context or screenshots about the feature request here.