mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Allows it to be queried from browser JS. No harm in not allowing this. Added helper function StatusExt.AddAllowOriginAny to make this easy to add.
16 lines
471 B
C#
16 lines
471 B
C#
namespace Robust.Server.ServerStatus;
|
|
|
|
/// <summary>
|
|
/// Helper functions for working with <see cref="IStatusHandlerContext"/>.
|
|
/// </summary>
|
|
public static class StatusExt
|
|
{
|
|
/// <summary>
|
|
/// Add <c>Access-Control-Allow-Origin: *</c> to the response headers for this request.
|
|
/// </summary>
|
|
public static void AddAllowOriginAny(this IStatusHandlerContext context)
|
|
{
|
|
context.ResponseHeaders.Add("Access-Control-Allow-Origin", "*");
|
|
}
|
|
}
|