@mapomodule/mapo-integrations-camomilla

This is an integration for Mapo nuxt module. This integrates camomilla compatibility layer.
733 1
Install
npm install @mapomodule/mapo-integrations-camomilla
Latest Version:1.0.0
License:MIT
Last Updated:Sep 2, 2026
Links: GitHub  ·  npm
Maintainer: bnznamco

mapo-integrations-camomilla 🌼

npm (scoped) GitHub

Mapo integration for Camomilla CMS. Implemented as a Nuxt module that adds a Nitro server middleware: every /api/* request is intercepted, path-rewritten to the matching Camomilla endpoint, and proxied to the backend with cookie/CSRF handling.

Installation

pnpm add mapo-integrations-camomilla
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ["mapomodule", "mapo-integrations-camomilla"],

  camomilla: {
    server: "http://localhost:8000",
    syncCamomillaSession: false,
    base: "",
    forwardedHeaders: [],
    pathRewrite: {}, // merged on top of the built-in rewrites
    skipPaths: [], // appended to the built-in skip list
    changeOrigin: true,
  },
});

What it does

  • Path rewriting: /api/auth/login → /api/camomilla/auth/login/, /api/profiles/me → /api/camomilla/users/current/, /api/media[-folders] → /api/camomilla/media[-folders], /api/menus → /api/camomilla/menus. Custom rewrites can be added via the pathRewrite option.
  • Skip list: /api/_nuxt_icon and /api/mock are never proxied. Add your own prefixes with skipPaths: ['/api/webhooks'] to keep local server routes local — the values are appended to the built-in defaults, never replace them.
  • Cookie sync: maps Mapo's __mapo_session to Django's sessionid on outgoing requests, and aliases sessionid back to __mapo_session on auth-path responses.
  • CSRF: forwards csrftoken as X-CSRFToken on every non-login request.
  • Forwarded headers: optional whitelist of extra request headers to forward to the Camomilla backend.

Source of truth

All cookie names and Mapo-side path constants live in src/constants.ts — no magic strings in the proxy or cookie sync code.

Dev workflow

pnpm dev:camomilla   # from monorepo root — watch mode

Reference

See docs/modules/camomilla for the full reference, and docs/modules/integrations-howto if you want to write your own backend integration.

Related Packages

@mapomodule/uikit

This is part of Mapo nuxt module. Injects Mapo ui components in the nuxt compone...

4,532 10
@mapomodule/core

This is part of Mapo nuxt module. Injects the core mapo plugin helpers.

2,908 10
@mapomodule/store

This is part of Mapo nuxt module. Injects mapo vuex store.

1,590 10
@mapomodule/utils

This is part of Mapo nuxt module. Provides a set of utils for the project.

1,287 10

Version History

Version Released License
1.0.0 MIT
Pre-releases (15)
Version Released Vue License
2.0.0-beta.6 ^3.0 MIT
2.0.0-beta.5 ^3.0 MIT
2.0.0-beta.4 ^3.0 MIT
2.0.0-beta.3 ^3.0 MIT
2.0.0-beta.2 ^3.0 MIT