Class Settings.CorsSettings

java.lang.Object
org.apache.tinkerpop.gremlin.server.Settings.CorsSettings
Enclosing class:
Settings

public static class Settings.CorsSettings extends Object
Settings to configure CORS (Cross-Origin Resource Sharing) for the HTTP endpoint.
  • Field Details

    • allowedOrigins

      public List<String> allowedOrigins
      List of allowed origins. Defaults to ["*"] which permits any origin. Set to specific origins (e.g. ["https://myapp.com"]) to restrict access.
    • allowedMethods

      public List<String> allowedMethods
      List of HTTP methods that browsers may use for cross-origin requests, returned in the preflight response. Empty by default. Gremlin Server only accepts POST for requests.
    • allowedRequestHeaders

      public List<String> allowedRequestHeaders
      List of request headers that browsers may send on cross-origin requests, returned in the preflight response. Empty by default. A browser only sends a JSON request if Content-Type is listed.
    • exposedHeaders

      public List<String> exposedHeaders
      List of response headers that browser scripts may read on cross-origin requests. Empty by default.
  • Constructor Details

    • CorsSettings

      public CorsSettings()