🎉 monetr is going live in January of 2025!

CORS (Cross Origin Resource Sharing)

monetr generally is hosted on a single domain name and thus does not require CORS, however if your self hosting setup requires that your monetr instance be accessible from another domain name then you must configure CORS.

Below is an example of the CORS configuration block:

config.yaml
cors:
  # allowedOrigins determines the value of the `Access-Control-Allow-Origin` response header. In monetr this defaults to
  # an empty list. This default forbids all cross origin access.
  allowedOrigins: 
    - https://your.monetr.local
  # Enable debug logging to help diagnose CORS issues.
  debug: true
NameTypeDefaultDescription
allowedOriginsArray[]Other origins that are allowed to access your monetr server.
debugBooleanfalseDebug logging for helping diagnose CORS issues.

The following environment variables can be used to configure CORS options:

VariableConfig File Field
MONETR_CORS_ALLOWED_ORIGINScors.allowedOrigins
MONETR_CORS_DEBUGcors.debug