We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dc9e58 commit 3eadeb6Copy full SHA for 3eadeb6
README.md
@@ -276,6 +276,22 @@ private static $extensions = [
276
277
A UUID will be generated on an objects `onBeforeWrite()` .
278
279
+## FAQ
280
+
281
+### I'm getting a 301 redirect when trying to call my api/endpoint
282
283
+In Silverstripe 5 `CanonicalURLMiddleware` is enabled to add a trialing
284
+slash by default. This can cause issues in production so we recommend
285
+disabling this completely for any API routes.
286
287
+```yml
288
+SilverStripe\Core\Injector\Injector:
289
+ SilverStripe\Control\Middleware\CanonicalURLMiddleware:
290
+ properties:
291
+ enforceTrailingSlashConfigIgnorePaths:
292
+ - 'api/'
293
+```
294
295
## API Documentation
296
297
Todo but it's not massive. See `ApiController` for now.
0 commit comments