Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Strapi REST API Prefix #38

Merged
merged 1 commit into from
Dec 27, 2022
Merged

Conversation

derrickmehaffy
Copy link

What it does

How to test it

In your ./config/api.js set the API Prefix to anything other than /api (which is the default:

module.exports = ({ env }) => ({
  rest: {
    prefix: env('API_PREFIX', '/v1'),
    defaultLimit: env('API_DEFAULT_LIMIT', 25),
    maxLimit: env('API_MAX_LIMIT', 100),
    withCount: env('API_WITH_COUNT', true),
  },
});

And check that the content-types are still cached compared to before this PR where if the prefix is not set to /api then nothing will be cached.

@derrickmehaffy derrickmehaffy self-assigned this Dec 24, 2022
@derrickmehaffy derrickmehaffy added the issue: enhancement New feature or request label Dec 24, 2022
@derrickmehaffy
Copy link
Author

image

@stafyniaksacha stafyniaksacha merged commit 382a960 into main Dec 27, 2022
@stafyniaksacha stafyniaksacha deleted the fix/apiPrefix branch December 27, 2022 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants