Route Production Traffic Through a Gateway or Reverse Proxy
Use a gateway or reverse proxy to provide a public HTTPS endpoint and control production traffic to ORDS.
Placing a gateway in front of Oracle Backend with Supabase APIs is the recommended deployment pattern for internet-facing ORDS deployments. Select an ingress layer and associated services to provide HTTPS, custom domain routing, rate limiting, and Web Application Firewall (WAF) protection.
The Oracle ORDS high availability reference architecture places a load balancer in front of the ORDS tier, which connects to the Oracle AI Database tier. For the architecture, see Deploy Oracle REST Data Services with high availability on Oracle Cloud Infrastructure.
Oracle Backend with Supabase APIs exposes client SDK and REST operations through ORDS. For shared deployments or standalone production deployments, configure HTTPS rather than HTTP, and expose a production HTTPS hostname through a controlled front door before traffic reaches ORDS. The front door can be an API gateway, reverse proxy, load balancer, or an equivalent ingress layer, with WAF protection where configured. Use this layer to provide the public endpoint for your apps, and to apply request controls consistently across authentication, database, storage, and App Trust traffic.
The production request path should follow this shape:
Client application
-> HTTPS endpoint for your app backend
-> API gateway, reverse proxy, or load balancer
-> ORDS
-> Oracle AI Database
The gateway or proxy should be the only public entry point. Wherever possible, configure ORDS to accept traffic only from the gateway, proxy, or trusted internal network that fronts it.
Configure the Public HTTPS Endpoint
Configure a production hostname for client traffic, for example: https://api.example.com. Bind a valid TLS certificate to that hostname, and route requests from the hostname to the appropriate ORDS base path for the project schema and any Oracle Backend with Supabase APIs service paths required by your enabled SDK features.
For example, a public route such as https://api.example.com/ords/<schema>/ can forward to an ORDS upstream such as: https://ords.internal.example.com/ords/<schema>/.
Use the production hostname in the configuration for your JavaScript applications, including web apps and progressive web apps (PWAs). The ords_host value in the client configuration should point to the public production endpoint. Preserve the path and trailing slash already present in your client configuration, and change only the host to the public production hostname because the SDK relies on them.
Do not point production clients to an internal ORDS host intended only for the deployment network.
Oracle’s ORDS best practices guide recommends configuring standalone ORDS with HTTPS using valid SSL certificates rather than the temporary certificates that ORDS generates during startup. See the Oracle REST Data Services best practices guide for the complete HTTPS guidance.
Preserve the External HTTPS Context for ORDS
If your gateway, reverse proxy, or load balancer terminates HTTPS and forwards requests to ORDS over HTTP, configure it to preserve the original public scheme and host. ORDS uses this information when handling secure-session behavior, redirects, callbacks, and absolute URLs generated for clients.
For example, when NGINX terminates the client HTTPS connection:
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
Configure ORDS to recognize the forwarded HTTPS header:
ords --config /path/to/config config set security.httpsHeaderCheck "X-Forwarded-Proto: https"
Replace /path/to/config with your ORDS configuration directory. For the setting, see the ORDS configuration reference.
The forwarding header identifies the original scheme; it does not encrypt the proxy-to-ORDS connection. With HTTPS forwarding, configure TLS for that connection as well. With TLS passthrough, ORDS terminates HTTPS.
Oracle recommends HTTPS throughout the stack when database Basic authentication is used.
The NGINX example assumes NGINX receives HTTPS. When another device terminates TLS before NGINX, verify how the trusted proxy chain communicates the original scheme and host.
Only trust these headers from a controlled gateway, reverse proxy, or load balancer. Restrict direct client access to the internal ORDS HTTP listener, and configure the proxy to overwrite incoming forwarding headers instead of passing untrusted client-supplied values.
Route Requests to ORDS
Configure the gateway or reverse proxy to preserve the ORDS path structure expected by Oracle Backend with Supabase APIs.
The upstream route must reach:
-
The enabled schema path under ORDS
-
Any Oracle Backend with Supabase APIs service paths derived from that host by the SDK
-
The HTTP methods used by the enabled services
At minimum, ensure that routing supports:
-
Authentication (sign in, sign out, token refresh, password reset, and configured browser redirect, popup, or manual provider flows).
-
Database operations used by your application, including reads, writes, queries, and multirow inserts or upserts.
-
Storage operations (uploads, downloads, metadata reads, listing, and deletions).
-
Web App Trust attestation exchange and protected service requests (when App Trust is enabled).
If your gateway rewrites paths, test each enabled service after the rewrite. A route that works for a basic availability check can still break storage uploads, authentication redirects, or database requests if headers, methods, body size limits, or timeouts are too restrictive.
Preserve Required Headers and Request Behavior
The gateway or reverse proxy must pass through the request data that ORDS and Oracle Backend with Supabase APIs services need to authenticate and authorize requests. The following examples are representative rather than exhaustive: the exact set of headers, methods, and query-string values depends on the platform and on which services you enable. Prioritize passing requests through unmodified over maintaining a strict allowlist, and verify each enabled service end-to-end rather than relying on this list alone.
Preserve these request behaviors:
-
Pass through
Authorizationheaders used for Basic and Bearer authentication. -
Pass through Oracle Backend with Supabase APIs service headers such as the following (when these headers are present):
-
x-transaction -
x-object-path -
x-dbfs-list-opts -
Range -
apikey -
Content-Type -
accept -
X-Fusabase-Mutation-Id
-
-
For web App Trust, preserve the attestation request and pass through the
X-BAAS-AppCheckandX-BAAS-InstanceIdheaders that the SDK attaches to protected service requests. -
Allow browser CORS preflight requests and preserve required CORS response headers.
-
Allow the HTTP methods used by your enabled Oracle Backend with Supabase APIs services.
-
Set request body size limits large enough for the storage uploads your app makes, both whole-file uploads sent in a single request and the configured chunk size used for larger, chunked uploads.
-
Preserve the original host and forwarding context when your deployment uses those values for redirects, callbacks, audit records, or logging.
For browser applications, test CORS from the actual production origin. When a request requires preflight, the preflight request must succeed before the browser sends the service request. Test authentication redirects and popup flows through the production endpoint. Verify request origins and callback URLs throughout these flows.
For storage, test uploads that match the size and pattern your application uses. Check that both whole-file requests and individual upload chunks fit within the ingress service’s limits. Increase configurable limits where supported.
Some limits are fixed: for example, OCI API Gateway has a nonadjustable 20 MB request-body limit. See API Gateway Internal Limits.
Apply Production Traffic Controls
Use the gateway or reverse proxy layer to enforce infrastructure-level controls independently of application authorization.
Configure the ingress layer and associated services to provide:
-
HTTPS termination or passthrough for the public endpoint, depending on the deployment
-
Custom domain routing
-
Request and response logging
-
Health checks that reflect ORDS upstream availability
-
Rate limiting for unauthenticated, authenticated, and write-intensive routes
-
WAF or equivalent application layer protection
-
Request body size limits appropriate for storage routes
-
Connection, read, and idle timeouts appropriate for SDK traffic
-
Access logging that can be sent to your monitoring, audit, or incident response system
Rate limits should protect ORDS and Oracle AI Database from accidental client loops, credential stuffing attempts, and unexpected traffic spikes. Apply stricter limits to unauthenticated routes and to routes that:
-
Create users
-
Issue authentication tokens
-
Write data
-
Upload files
-
Run expensive queries
Manage WAF policies at the public ingress layer. Deep Data Security remains responsible for data authorization and does not replace request filtering, request normalization, or traffic controls at the public edge.
Understand the Security Layers
The gateway or reverse proxy controls how requests enter the deployment but does not replace Oracle Backend with Supabase APIs authentication, App Trust, Deep Data Security, or Oracle AI Database security controls.
Integrate these layers conceptually:
Gateway, proxy, or load balancer with configured edge controls
-> ORDS
-> App Trust validation, if enabled
-> Authentication and Deep Data Security
-> Oracle AI Database
Each layer has a distinct responsibility:
| Layer | Responsibility |
|---|---|
| Gateway or reverse proxy | Handles HTTPS for the public endpoint, routes requests, applies traffic controls, and records access logs |
| ORDS | Receives the routed service requests and exposes the Oracle Backend with Supabase APIs endpoints |
| App Trust | Verifies trusted app traffic for configured applications and services |
| Authentication | Identifies the signed in user or service context |
| Deep Data Security | Enforces data authorization within Oracle AI Database |
| Oracle AI Database | Stores the data and enforces database level controls |
Do not rely on any single layer for the full production security posture. A request can be well formed at the gateway and still fail authentication, App Trust validation, or Deep Data Security. Likewise, a request that would be denied later should still be rate-limited and logged before it reaches ORDS.
ORDS and Oracle AI Database sit below Oracle Backend with Supabase APIs in this stack, so the guidance Oracle publishes for hardening, observability, and capacity for either of them applies here too. Use that material as your reference instead of treating Oracle Backend with Supabase APIs as a separate system. The Oracle REST Data Services best practices guide covers HTTPS, HA, connection pool sizing, and ORDS updates in depth, and those recommendations apply to every Oracle Backend with Supabase APIs deployment.