mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-04 17:37:24 +00:00
SpaceAPI: get origin by env
This commit is contained in:
parent
0a64de0e1d
commit
cafbd5bafe
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ const absoluteURL = (origin: string) => (url: string) =>
|
||||||
|
|
||||||
export default ({ strapi }: { strapi: Core.Strapi }) => ({
|
export default ({ strapi }: { strapi: Core.Strapi }) => ({
|
||||||
async index(ctx: Context) {
|
async index(ctx: Context) {
|
||||||
const origin = ctx.request.origin;
|
const origin = process.env.APP_URL ?? ctx.request.origin;
|
||||||
|
|
||||||
const result = {} as Record<string, any>;
|
const result = {} as Record<string, any>;
|
||||||
result.api_compatibility = [SPACE_API_VERSION];
|
result.api_compatibility = [SPACE_API_VERSION];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue