mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-13 18:18:15 +03:00
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:
parent
f43c59c043
commit
7c7081a3ba
3 changed files with 47 additions and 28 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue