public CorsHeaderPlugin flag ( String flagValue ) { if ( isRegistered ( ) ) throw new UnsupportedOperationException ( "CorsHeaderPlugin.flag(String) must be called before register()" ) ; if ( ! flags . contains ( flagValue ) ) { flags . add ( flagValue ) ; } return this ; }
Set a flag on the automatically generated OPTIONS route for pre - flight CORS requests .