This release supports all features of Version 1.0 and optional individual API KEYs per each REST API endpoint.
Optional API keys for pre-registered REST API endpoints should be configured in the .env or .env.local file under the SERVER_ONLY_restApiKeys key, as shown below:
# Optionally, you can add API keys for some of the endpoints above.
# Keys support regex notation, and their values should be separated by a colon.
# API keys configured here remain on the server side and are never exposed to the client.
SERVER_ONLY_restApiKeys="
employees:ApiKey1
albums$:ApiKeyForAlbums
dummyjson.+users$:ApiKeyWithRegexForTheLastEndpoint
"
# These REST API endpoints are exposed on both the server and client sides.
NEXT_PUBLIC_restEndpoints="
http://localhost:4000/employees?_sort=displayName&_order=asc
https://jsonplaceholder.typicode.com/posts
https://jsonplaceholder.typicode.com/comments
https://jsonplaceholder.typicode.com/albums
https://jsonplaceholder.typicode.com/photos
https://jsonplaceholder.typicode.com/todos
https://jsonplaceholder.typicode.com/users
https://dummyjson.com/users"
API Keys for "ad-hoc" REST API endpoints can be entered directly into the UI of the right-hand panel "Compact playground".
Additional improvements in Version 1.1.1 (October 23, 2024)
-
Upgraded Next.js from v15-beta to the official public release of v15.0.1.
-
Fixed the issue with missing server-side environment variables in standalone production builds.
// next.config.mjs // ... env: { // Next.js has a known issue: during production builds in "standalone" mode, it does not export server-side variables from .env.local. // To resolve this, you should use .env or .env.production for standalone builds. // Alternatively, you can declare server-side variables from .env.local as exportable ones in next.config.mjs, as shown below. SERVER_ONLY_restApiKeys: process.env.SERVER_ONLY_restApiKeys, pagecachetimeout: process.env.pagecachetimeout, },