drunomics / nuxtjs-drupal-ce

A Nuxt module to easily connect Drupal via custom elements.
https://lupus-decoupled.org/
MIT License
22 stars 4 forks source link

feat: add-api-proxy: Add Nitro server API routes #179

Closed vloss3 closed 5 months ago

vloss3 commented 8 months ago

Solves #165

TurtlBbx commented 8 months ago

@vloss3 Once the improvements are done, could you add a test case for when the exposeAPIRouteRules option is set to false. It can be a copy of https://github.com/drunomics/nuxtjs-drupal-ce/blob/2.x/test/basic.test.ts with the exposeAPIRouteRules set to false.

TurtlBbx commented 8 months ago

@vloss3 README needs to be updated as well for this feature.

vloss3 commented 7 months ago

The following was discussed to move forward with this feature:

New options:

Note: Those options will have defaults and will not require configuration changes

Route rules changes:

Use cases to consider:

Tests and customizing cache rules(by project) will be carried in follow-up issues.

fago commented 7 months ago

@vloss3 I updated README slightly. I was not sure about DRUPAL_BASE_URL - do we still support that variable actually? Since there is built-in support in nuxt to override config via NUXTPUBLIC... I could see us dropping that + documenting that instead.