0.1.2 • Published 11 months ago
@vtex/raccoon-url2proxy v0.1.2
@vtex/raccoon-url2proxy
This package is a simple utility to convert a URL to a Raccoon Proxy (not related to the raccoon-proxy package) URL.
It is used by the Admin on Next.js to point Next.js Raccoon applications that opted-in to use the Raccoon Proxy and be served over *.myvtex.com, as well as by the update-prod-url script from the Raccoon Dev package in order to keep the production URLs updated across a Raccoon application codebase.
Usage
import { url2proxy } from '@vtex/raccoon-url2proxy'
const url = 'https://example.com'
const proxyUrl = url2RaccoonProxy(url)
console.log(proxyUrl) // /admin/raccoon/proxy/v1/example--comWant to learn more?
Learn more about the Raccoon Proxy in the cdn package's README Lambda functions to serve Next.js Admin Apps (Raccoon) under *.myvtex.com section..