Use POST for the /api/apply-wg-config endpoint and check the Content-Type Header for all non-GET requests to prevent CSRF attacks

This commit is contained in:
Marcus Wichelmann 2022-07-08 20:02:18 +02:00
parent f43c59c043
commit 7c7081a3ba
No known key found for this signature in database
GPG key ID: D9FC1B92E557C80D
3 changed files with 47 additions and 28 deletions

View file

@ -494,7 +494,7 @@
$("#apply_config_confirm").click(function () {
$.ajax({
cache: false,
method: 'GET',
method: 'POST',
url: '{{.basePath}}/api/apply-wg-config',
dataType: 'json',
contentType: "application/json",