Commit bdd837c
Add docs for applying CORS to SignalR hubs without global middleware (#36936)
* Initial plan
* Add content about enabling CORS for SignalR without applying the policy globally
Add a new subsection "Apply a CORS policy to SignalR hub endpoints" under the
CORS section in SignalR security docs. Documents two approaches:
1. Using RequireCors on the MapHub endpoint mapping
2. Using the [EnableCors] attribute on the Hub class
Applied across all relevant moniker versions (8.0+, 7.0, 6.0, 3.0-5.x).
Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/c6bf092e-343b-49ad-bfa1-e83078d9e265
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
* Add named CORS policy registration example to SignalR hub CORS subsection
Show the AddCors/AddPolicy snippet that defines "SignalRPolicy" before
it's referenced in the RequireCors and [EnableCors] examples.
Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/eeaca9de-513b-4a43-a838-4e3f6ca91450
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
* Add author information to security.md
* Apply suggestion from @wadepickett
* Apply suggestions from code review
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
* Apply suggestions from code review
Co-authored-by: Wade Pickett <wpickett@microsoft.com>
* Revert changes to security2.1-5.md, security6.md, and security7.md
Per BrennanConroy's feedback, these are unsupported versions and
don't need the CORS documentation update. The new CORS subsection
is retained only in security.md (aspnetcore 8.0+).
Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/c741589c-d9d2-40d2-ad8e-14eed4304350
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Co-authored-by: Wade Pickett <wpickett@microsoft.com>1 parent ddce1bc commit bdd837c
1 file changed
Lines changed: 41 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
42 | 82 | | |
43 | 83 | | |
44 | 84 | | |
| |||
0 commit comments