fix: ajout X-CSRF-Token dans les requêtes save/delete Gitea
This commit is contained in:
@@ -280,7 +280,7 @@ function giteaWorkspace() {
|
|||||||
try {
|
try {
|
||||||
var r = await fetch('/api/gitea/projects/' + this.owner + '/' + this.repo + '/file', {
|
var r = await fetch('/api/gitea/projects/' + this.owner + '/' + this.repo + '/file', {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
headers: {'Content-Type': 'application/json'},
|
headers: {'Content-Type': 'application/json', 'X-CSRF-Token': this.getCsrfToken()},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
path: this.filePath, content: this.editContent,
|
path: this.filePath, content: this.editContent,
|
||||||
message: this.commitMessage, sha: this.fileSha,
|
message: this.commitMessage, sha: this.fileSha,
|
||||||
|
|||||||
Reference in New Issue
Block a user