Use Proxy

By configuring the BFF proxy, API requests can be forwarded without manual coding


Using a BFF proxy ensures that requests can enter the BFF handler. (eg the request path must contain a bff prefix)

Writing the following BFF proxy configuration in the modern.server-runtime.config.js file will proxy requests sent to http://localhost:8080/api/v1/topics to

import { defineConfig } from '@modern-js/app-tools/server';
export default defineConfig({
  bff: {
    proxy: {
      '/api/v1/topics': '',

For more detail, see bff.proxy. For more proxy info, see Proxy.