Class DbAclCorsFeature

java.lang.Object
com.illumon.iris.db.v2.permissions.rs.DbAclCorsFeature
All Implemented Interfaces:
io.deephaven.shadow.resteasy.javax.ws.rs.core.Feature

@Provider @Priority(1) public class DbAclCorsFeature extends Object implements io.deephaven.shadow.resteasy.javax.ws.rs.core.Feature
Supports configuring of CorsFilter when the server setup is not using Envoy. Using Feature implementation to avoid to add the filter as a Singleton in DbAclRestApplication This should allow scanning of resources by annotations, in case that is something we want to do.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    configure(io.deephaven.shadow.resteasy.javax.ws.rs.core.FeatureContext featureContext)
    Verifies if server setup is not using Envoy and populates web api host:port as an allowed origin, along with user configurable origin for CORS.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DbAclCorsFeature

      public DbAclCorsFeature()
  • Method Details

    • configure

      public boolean configure(io.deephaven.shadow.resteasy.javax.ws.rs.core.FeatureContext featureContext)
      Verifies if server setup is not using Envoy and populates web api host:port as an allowed origin, along with user configurable origin for CORS.

      The allowed methods are OPTIONS, GET, POST, PUT, DELETE

      For more information see Feature.configure(FeatureContext)

      Specified by:
      configure in interface io.deephaven.shadow.resteasy.javax.ws.rs.core.Feature
      Parameters:
      featureContext - the current featureContext
      Returns:
      true regardless of Envoy is used or not in server setup