This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $token = $args[0] | |
| $original_dir = Get-Location | |
| Set-Location .. | |
| (Get-Content "$original_dir\event.json" -Raw) -replace "#TOKEN#", $token | Set-Content "$original_dir\event.tmp.json" | |
| serverless invoke --function validateToken --path "$original_dir\event.tmp.json" --config .\serverless.yml --log | |
| Remove-Item "$original_dir\event.tmp.json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $response = Invoke-WebRequest -Uri "https://#FILL_TARGET_HERE#" -Method Options -Headers @{ | |
| "Origin" = "https://#FILL_ORIGIN_HERE#" | |
| "Access-Control-Request-Method" = "GET" | |
| "Access-Control-Request-Headers" = "Authorization" | |
| "Accept" = "application/json" | |
| } -UseBasicParsing | |
| $color = "Red" | |
| $headers = $response.Headers | ConvertTo-Json | |
| if ($headers -match "Access-Control-Allow-Origin") { |
OlderNewer