Class Settings.CorsSettings
java.lang.Object
org.apache.tinkerpop.gremlin.server.Settings.CorsSettings
- Enclosing class:
- Settings
Settings to configure CORS (Cross-Origin Resource Sharing) for the HTTP endpoint.
-
Field Summary
FieldsModifier and TypeFieldDescriptionList of HTTP methods that browsers may use for cross-origin requests, returned in the preflight response.List of allowed origins.List of request headers that browsers may send on cross-origin requests, returned in the preflight response.List of response headers that browser scripts may read on cross-origin requests. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
allowedOrigins
List of allowed origins. Defaults to["*"]which permits any origin. Set to specific origins (e.g.["https://myapp.com"]) to restrict access. -
allowedMethods
List of HTTP methods that browsers may use for cross-origin requests, returned in the preflight response. Empty by default. Gremlin Server only acceptsPOSTfor requests. -
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 ifContent-Typeis listed. -
exposedHeaders
List of response headers that browser scripts may read on cross-origin requests. Empty by default.
-
-
Constructor Details
-
CorsSettings
public CorsSettings()
-