![]() In other words, custom modules can be normally required. When the trustUserCode is true, the sandbox.allowedModules is ignored. The option can be also enabled when the safe execution is guaranteed through the virtualization like when docker workers extension is used. However, this should be done only in case the jsreport users have full trust because it becomes easy to reach the local system. The sandboxing of the user code has a small performance penalty and can be disabled by setting trustUserCode: true. This means users can't access the local system or require custom modules. TrustUserCode ( boolean) - jsreport evaluates user code in the safe sandbox by default. You can find the list of available blob storage drivers and further details how to configure them here Trusting users code The particular implementation is distinguish based on blobStorage.provider attribute. ( boolean) - optionally disable transactions, this can be needed for some cloud databases like Azure CosmosDb or AWS DocumentDB that badly supports transactions.īlobStorage ( object) - optional, specifies type of storage used for storing blobs. You can find the list of available store drivers and further details on how to configure them here. Alternatively, you can install an additional extension providing a template store and change store to reflect it. The predefined value in the pre-created configuration file is fs which employs fs store to store report templates on the file system. The particular implementation is distinguish based on store.provider attribute. Store ( object) - jsreport supports multiple implementations for storing templates. It specifies if all jsreport routes should be available with appPath as the prefix, therefore making appPath the new root URL of application Store MountOnAppPath ( boolean) - use this option along with appPath. The default behavior is that it is assumed that jsreport is running behind a proxy, so you need to do URL rewrite /reporting -> / to make it work correctly, See mountOnAppPath when there is no proxy + URL rewrite involved in your setup. Hostname (string) - hostname to be used for the jsreport server ( optional)Į ( string) - optional limit for incoming request size, default is 50mbĮ ( boolean) - optionaly you can disable cors, default trueĮ ( boolean) - specifies if incoming request http headers should be exposed as inside jsreport scripts, default falseĪppPath ( string) - optionally set application path, if you run an application on then set "/reporting" to the appPath. In other words the following json configuration: "extensions" : Therefore jsreport supports using camel casing instead of the - in the configuration environment variables. Many systems like Kubernetes don't like - in the environment variables. Windows: set extensions_authentication_admin_username=john Unix: extensions_authentication_admin_username=john jsreport start If you want to use an environment variable for configuring a complex object you should separate the nested path in the key using _ (or :): This will start jsreport on port 3000 even if you have the httpPort entry in the config file because the environment variables have the higher priority. Windows: set httpPort=3000&jsreport start You can use it, for example, to change the port: The environment variables are collected and merged into the final configuration during the jsreport startup as well. info: Initializing jsreport (version: 2.11.0, configuration file:, nodejs: 14.17.0) ![]() Hint: You should see the currently applied configuration file name in the first lines of the startup logs. This means you can have different config files for different environments and distinguish using the configFile environment variable which one should be used. The config file can be explicitly specified using configFile=path with both relative or absolute paths. The default is usually pre-created for you if you follow installation instructions. ![]() The configuration file is the most common way to adapt jsreport. Jsreport merges configuration from the config file, environment variables, the command line arguments, and also directly from the application code in this exact order. Hint: You can get the list of supported configuration options using command jsreport configuration provides many options like changing an HTTP port, setting store provider to a different mechanism, and many others. The easiest way to adapt jsreport to your needs is to change its configuration. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |