cors-proxy-nginx/index.html

29 lines
585 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=https://google.com/',
success: res => {
$('#response').text(res);
},
error: err => {
$('#response').text(err.statusText);
}
})
});
</script>
</html>