Created
February 13, 2025 08:33
-
-
Save donma/fa94cb72ae0da3cd9407bd0229104d5c to your computer and use it in GitHub Desktop.
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
| options.AddPolicy("SecurePolicy", | |
| policy => policy.WithOrigins("https://yourdomain.com") // 限制特定網域 | |
| .AllowMethods("GET", "POST") // 只允許 GET 和 POST | |
| .AllowHeaders("Content-Type", "Authorization")); // 只允許特定標頭 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment