Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have this function which pushes high scores onto the server

async function pushNewHighscore(score) {
	const req = await fetch('/createhighscore', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json'
		},
		body: JSON.stringify({
			score
		})
	});

	return req.status;
}


But this can be hacked using the console
How do I verify if the high score was actually hard-earned and not hacked
Here for all the code:
Space Chaos - Replit[^]

What I have tried:

Asking my full stack devolpers friends
Posted
Updated 28-Apr-21 21:47pm
v2

1 solution

The only solution is to change your code to calculate the scores on the server. But nobody is going to download your entire project and wade through it to tell you precisely how to do that.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900