Interface FunctionUrlCorsOptions

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:21.019Z") @Stability(Stable) public interface FunctionUrlCorsOptions extends
Specifies a cross-origin access property for a function URL.


 Function fn;
                 // Allow this to be called from websites on
                 // Can also be ['*'] to allow all domain.
  • Method Details

    • getAllowCredentials

      @Stability(Stable) @Nullable default Boolean getAllowCredentials()
      Whether to allow cookies or other credentials in requests to your function URL.

      Default: false

    • getAllowedHeaders

      @Stability(Stable) @Nullable default List<String> getAllowedHeaders()
      Headers that are specified in the Access-Control-Request-Headers header.

      Default: - No headers allowed.

    • getAllowedMethods

      @Stability(Stable) @Nullable default List<HttpMethod> getAllowedMethods()
      An HTTP method that you allow the origin to execute.

      Default: - [HttpMethod.ALL]

    • getAllowedOrigins

      @Stability(Stable) @Nullable default List<String> getAllowedOrigins()
      One or more origins you want customers to be able to access the bucket from.

      Default: - No origins allowed.

    • getExposedHeaders

      @Stability(Stable) @Nullable default List<String> getExposedHeaders()
      One or more headers in the response that you want customers to be able to access from their applications.

      Default: - No headers exposed.

    • getMaxAge

      @Stability(Stable) @Nullable default Duration getMaxAge()
      The time in seconds that your browser is to cache the preflight response for the specified resource.

      Default: - Browser default of 5 seconds.

    • builder

      @Stability(Stable) static FunctionUrlCorsOptions.Builder builder()
      a FunctionUrlCorsOptions.Builder of FunctionUrlCorsOptions