Saltu al enhavo

Agordoj de la servilo

Se vi volas ŝanĝi la Malfermitan Retan Kalendaron pro viaj bezonoj, tio eblas. Vi povas

  • Ŝanĝi la aspekton de la implicita kalendaro.
  • Ŝanĝi la funkciadon de la servilo.

Adapti la implicitan kalendaron

The configuration of all calendars is rooted in the default_specification. All those values can be changed through a copy of this file hosted on the web through the calendar parameter specification_url. Each parameter should be documented in default_specification.

To modify all calendars hosted on your instance, use the OWC_SPECIFICATION environment variable. Calendars still override some values for their configuration. Those which they do not override are affected by the default specification. Not all values are exposed to the configuration page to be changed. Those values can still be changed in the specification_url and the query parameters.

You might want to change the following values.

title

The title of your website.

language

This is the default language. You might want to change this to serve the configuration page better to a local audience.

favicon

This is a link to the website icon.

source_code

If you made changes, you are legally required to disclose them to visitors. Please adjust the link or contribute them back to the main project.

contributing

If you want to redirect to contribute to your project.

privacy_policy

If you host this service yourself, you can use the default privacy policy.

If for some reason you decide to collect data i.e. in the HTTPS proxy or log IP-addresses, then you need to create your own privacy policy. You can link to the one of this project.

More Values

There are loads more values that can be changed. Please refer to the default_specification. These values are all documented. Please use the OWC_SPECIFICATION environment variable to change them.

Vidu ankaŭ:

Agordado de la servilo

Medivariabloj nur influas la funkciadon de la servilo. Tiuj medivariabloj povas esti uzitaj por agordi la servon:

ALLOWED_HOSTS

implicite malplena

The clients divided by comma that are allowed to access the Open Web Calendar. You will see this text if you try to access the service and you are not allowed:

Forbidden: You don’t have the permission to access the requested resource. It is either read-protected or not readable by the server.*

Examples:

  • permit only the same computer: ALLOWED_HOSTS=localhost
  • permit several hosts: ALLOWED_HOSTS=192.168.0.1,192.168.2,api.myserver.com
  • permit everyone to access the server (default): ALLOWED_HOSTS= or ALLOWED_HOSTS=*

This functionality is provided by flask-allowed-hosts.

PORT

implicite 5000, implicite 80 en Docker

La pordo por la servo.

Examples:

  • Disponigi ĉe HTTP-pordo: PORT=80

OWC_SPECIFICATION

OWC_SPECIFICATION is an optional environment variable.

  • It can be a path to a file containing valid YAML or JSON.
  • It can be a string containing valid YAML or JSON.

Setting OWC_SPECIFICATION allows you to replace default values for all calendars.

Note

New versions of the Open Web Calendar can add new configuration parameters. Placing your changes in this variable instead of changing the default_specification file will ensure that you do not break the Open Web Calendar in a future version.

In following example, the title for all calendars that do not set their own title will be changed.

OWC_SPECIFICATION='{"title": "calendar"}' gunicorn open_web_calendar:app

Vidu ankaŭ:

WORKERS

implicite 4, nur por Docker

La nombro de paralelaj procezoj por la petoj.

Examples:

  • Nur uzi unu procezon: WORKERS=1

CACHE_REQUESTED_URLS_FOR_SECONDS

implicite 600

Nombro de sekundoj, dum kiu la elŝutitaj kalendaraj dosieroj estas tenataj, por malpliigi Interretan trafikon.

Examples:

  • Refreŝigi rapide: CACHE_REQUESTED_URLS_FOR_SECONDS=10

APP_DEBUG

implicite true, validaj valoroj truefalse, ĉiam false en Docker

Uzi la sencimigan flagon por la programo.

Pliaj agordoj

La Malfermita Reta Kalendaro uzas bibliotekojn, kies konduto estas plie adaptebla.

Protekto kontraŭ servilflanka petofalsado per retperanto

La Malfermita Reta Kalendaro povas esti uzata por aliri la lokan reton malantaŭ fajroŝirmilo; vidu Problemon 250. Tiu libera aliro celas ĉie montri kalendarojn. Ĉar requests estas uzata de la Malfermita Reta Kalendaro, ĝi povas uzi retperilo laŭ la dokumentaro de requests. La retperilo povas filtri la trafikon.

export HTTP_PROXY="http://10.10.1.10:3128"
export HTTPS_PROXY="http://10.10.1.10:1080"
export ALL_PROXY="socks5://10.10.1.10:3434"

Vidu ankaŭ: