Popravki, dokumentiranje
parent
6719acdb8e
commit
f775e7131f
|
@ -46,7 +46,8 @@ class Client {
|
|||
}
|
||||
|
||||
/**
|
||||
* Method description.
|
||||
* Poizvedi na etherpadov API. Doda baseURL in verzijo pred zeljen url, doda
|
||||
* API ključ in uredi parametre. Vendo je POST!
|
||||
*/
|
||||
public function request($url, $opts = []) {
|
||||
$uri = "{$this->baseUrl}/" . self::API_VERSION . '/' . explode('?', $url)[0];
|
||||
|
|
|
@ -36,6 +36,8 @@ class EtherpadApiController extends ControllerBase {
|
|||
$data = array_merge($request->query->all(), $request->request->all());
|
||||
if ($data['padID']) {
|
||||
// @TODO prefix v config!
|
||||
// Zahtevnejše ampak lepše bi bilo pa uporabit group API:
|
||||
// https://etherpad.org/doc/v1.8.4/#index_creategroup
|
||||
$data['padID'] = 'yufu-' . $data['padID'];
|
||||
}
|
||||
$opts = ['form_params' => $data];
|
||||
|
|
|
@ -206,14 +206,14 @@ parameters:
|
|||
# for more information about the topic in general.
|
||||
# Note: By default the configuration is disabled.
|
||||
cors.config:
|
||||
enabled: false
|
||||
enabled: true
|
||||
# Specify allowed headers, like 'x-allowed-header'.
|
||||
allowedHeaders: []
|
||||
# Specify allowed request methods, specify ['*'] to allow all possible ones.
|
||||
allowedMethods: []
|
||||
# Configure requests allowed from specific origins. Do not include trailing
|
||||
# slashes with URLs.
|
||||
allowedOrigins: ['*']
|
||||
allowedOrigins: ['yufu.kompot.si', 'localhost']
|
||||
# Sets the Access-Control-Expose-Headers header.
|
||||
exposedHeaders: false
|
||||
# Sets the Access-Control-Max-Age header.
|
||||
|
|
Loading…
Reference in New Issue