RealComposer
Platform

Vue / SPA Edge API Recipes

Production-ready templates for calling third-party APIs from Vue / SPAwithout exposing secrets or maintaining a custom backend.

Vue safe & unsafe practices
Security & Secret Vault

Protect API Key in Vue SPA

Vue / SPA cannot safely store REST API production keys. Vault-bound headers reach https://jsonplaceholder.typicode.com/users/{{query.userId}} on Workers while apps call your hide-api-key-vue-spa edge URL.

Sub-10ms edgeView Recipe
Security & Secret Vault

Call cloudinary api from vue spa without secret key

Upload and transform URLs signed at the edge with API secret in Vault. For "call cloudinary api from vue spa without secret key", store CLOUDINARY_BASIC_AUTH in Secret Vault, call https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image from a Worker, and let Vue / SPA hit only https://realcomposer.com/v1/workspace/call-cloudinary-from-vue-securely with an rc_live_ client token.

Sub-10ms edgeView Recipe
Payload Slimmer

Cloudinary resource json trim for image picker

Return public_id format width height only from resources list. For "cloudinary resource json trim for image picker", store CLOUDINARY_BASIC_AUTH in Secret Vault, call https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image from a Worker, and let Vue / SPA hit only https://realcomposer.com/v1/workspace/trim-cloudinary-resource-json-picker with an rc_live_ client token.

Sub-10ms edgeView Recipe
Edge Caching & Rate Limits

Cache cloudinary transformation api at edge

Cache transformation metadata responses per public_id. For "cache cloudinary transformation api at edge", store CLOUDINARY_BASIC_AUTH in Secret Vault, call https://api.cloudinary.com/v1_1/{{secrets.CLOUDINARY_CLOUD_NAME}}/resources/image from a Worker, and let Vue / SPA hit only https://realcomposer.com/v1/workspace/cache-cloudinary-transformations-edge with an rc_live_ client token. Enable 300s GET cache only when query params identify the resource.

Sub-10ms edgeView Recipe