fix: accept SAC ingest HTTP 201, 409, and legacy 202

Remove .cursorignore (patterns covered by repo hygiene elsewhere)
This commit is contained in:
2026-05-28 09:13:14 +10:00
parent 9030fb3c30
commit 1092f6340d
2 changed files with 2 additions and 67 deletions
-65
View File
@@ -1,65 +0,0 @@
# Çàâèñèìîñòè è ïàêåòû
node_modules/
bower_components/
jspm_packages/
.npm/
vendor/
.pnpm-store/
# Âèðòóàëüíûå îêðóæåíèÿ (Python)
.venv/
venv/
env/
ENV/
.env/
# Ñáîðêà, êýø è àðòåôàêòû
dist/
build/
out/
.next/
.nuxt/
.docusaurus/
.cache/
.sass-cache/
.turbo/
target/
bin/
obj/
# Ñèñòåìíûå ïàïêè IDE è ëîãè
.git/
.svn/
.idea/
.vscode/
.cursor/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Ìåäèà, øðèôòû è òÿæåëûå áèíàðíûå ôàéëû
*.png
*.jpg
*.jpeg
*.gif
*.svg
*.ico
*.mp4
*.mp3
*.pdf
*.zip
*.tar.gz
*.rar
*.exe
*.dll
*.woff
*.woff2
*.ttf
*.eot
# Ñãåíåðèðîâàííûå ôàéëû áëîêèðîâîê (îïöèîíàëüíî, ýêîíîìÿò ìíîãî òîêåíîâ)
package-lock.json
yarn.lock
pnpm-lock.yaml
poetry.lock
+2 -2
View File
@@ -225,7 +225,7 @@ function Invoke-SacPostPayload {
'Idempotency-Key' = $eventId
}
$resp = Invoke-WebRequest -Uri $ingest -Method Post -Headers $headers -Body $JsonBody -UseBasicParsing -TimeoutSec $timeout
if ($resp.StatusCode -eq 202) {
if ($resp.StatusCode -in 201, 409, 202) {
Remove-SacSpoolFile -EventId $eventId
Reset-SacFailCount
Write-SacLog "SAC: accepted event_id=$eventId type=$eventType"
@@ -393,7 +393,7 @@ function Test-SacConnection {
return 1
}
if (Send-SacEvent -EventType 'agent.test' -Severity 'info' -Title 'SAC test' -Summary 'rdp-login-monitor CheckSac') {
Write-Host 'SAC ingest agent.test: OK (expected HTTP 202)'
Write-Host 'SAC ingest agent.test: OK (expected HTTP 201)'
return 0
}
Write-Error 'SAC ingest agent.test: FAIL'