Preskočiť na obsah

Konfigurácia servera

Ak chcete zmeniť Open Web Calendar slúžiť vašim potrebám, je to dobre možné. Môžete si vybrať

  • Zmeniť, ako vyzerá predvolený kalendár.
  • Zmeniť, ako funguje server.

Konfigurácia kalendára Default

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.

See also:

Konfigurácia servera

Premenné prostredia ovplyvňujú iba chod servera. Tieto premenné prostredia môžu byť použité na konfiguráciu služby:

ALLOWED_HOSTS

predvolené prázdne

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

predvolené 5000, predvolené 80 v kontajneri Docker

Prístav, na ktorom funguje služba.

Examples:

  • Slúžiť na HTTP port: 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

See also:

WORKERS

predvolené 4, len pre kontajner Docker

Počet paralelných pracovníkov na spracovanie požiadaviek.

Examples:

  • Používajte iba jedného pracovníka: WORKERS=1

CACHE_REQUESTED_URLS_FOR_SECONDS

predvolené 600

Po druhé vyrovnávanie kalendárových súborov, ktoré sa stiahli na zníženie šírky pásma a oneskorenie.

Examples:

  • Obnoviť rýchlo: CACHE_RESTED_URLS_FOR_SECONDS=10

APP_DEBUG

predvolené true, hodnoty true alebo false, vždy false v kontajneri Docker

Nastaviť debug vlajku pre aplikáciu.

Further Configuration

Open Web Calendar používa knižnice, ktorých správanie môže byť ďalej prispôsobené.

Ochrana SSRF so serverom Proxy

Open Web Calendar možno použiť na prístup k miestnej sieti za firewallom, pozri Issue 250. Tento voľný prístup je určený pre zobrazenie kalendárov odkiaľkoľvek. Od Requests sa používa Open Web Calender, môže použiť proxy ako je popísané v requests dokumentácia. proxy môže potom zvládnuť filtrovanie.

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"

See also: