cors-proxy-nginx/index.html

29 lines
592 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CORS</title>
</head>
<body>
Response: <span id="response"></span>
</body>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script>
$(function() {
$.ajax({
url: 'http://localhost:8080/service?url=http://192.168.2.214:3000/',
success: res => {
$('#response').text(res);
},
error: err => {
$('#response').text(err.statusText);
}
})
});
</script>
</html>