Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/RestyaPlatform/board into v1…
Browse files Browse the repository at this point in the history
….7.1
  • Loading branch information
saravanan477 committed Mar 11, 2022
2 parents 37401a1 + 306face commit 914ecc0
Show file tree
Hide file tree
Showing 16 changed files with 706 additions and 414 deletions.
141 changes: 127 additions & 14 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,134 @@
---
engines:
version: "2"
checks:
argument-count:
enabled: true
config:
threshold: 10
complex-logic:
enabled: false
file-lines:
config:
threshold: 10000
similar-code:
enabled: false
identical-code:
enabled: false
method-complexity:
enabled: true
config:
threshold: 10000
method-count:
enabled: true
config:
threshold: 1000
method-lines:
config:
threshold: 10000
nested-control-flow:
enabled: true
config:
threshold: 10000
return-statements:
enabled: true
config:
threshold: 100
plugins:
csslint:
enabled: true
checks:
adjoining-classes:
enabled: false
box-model:
enabled: false
box-sizing:
enabled: false
compatible-vendor-prefixes:
enabled: false
display-property-grouping:
enabled: false
duplicate-background-images:
enabled: false
duplicate-properties:
enabled: false
empty-rules:
enabled: false
fallback-colors:
enabled: false
gradients:
enabled: false
known-properties:
enabled: false
important:
enabled: false
order-alphabetical:
enabled: false
outline-none:
enabled: false
overqualified-elements:
enabled: false
qualified-headings:
enabled: false
universal-selector:
enabled: false
unqualified-attributes:
enabled: false
regex-selectors:
enabled: false
star-property-hack:
enabled: false
text-indent:
enabled: false
underscore-property-hack:
enabled: false
zero-units:
enabled: false
eslint:
enabled: true
fixme:
enabled: true
checks:
TODO:
enabled: false
XXX:
enabled: false
phpmd:
enabled: true
ratings:
paths:
- "**.css"
- "**.js"
- "**.php"
exclude_paths:
- api_explorer/*
- build/*
- client/css/converse.css
- client/js/libs/*
- server/php/libs/vendors/**/*
enabled: false
checks:
CleanCode/BooleanArgumentFlag:
enabled: false
CleanCode/ElseExpression:
enabled: false
CleanCode/IfStatementAssignment:
enabled: false
CleanCode/MissingImport:
enabled: false
CleanCode/StaticAccess:
enabled: false
Controversial/CamelCaseMethodName:
enabled: false
Controversial/CamelCaseParameterName:
enabled: false
Controversial/CamelCasePropertyName:
enabled: false
Controversial/CamelCaseVariableName:
enabled: false
Controversial/Superglobals:
enabled: false
CyclomaticComplexity:
enabled: false
Design/LongMethod:
enabled: false
Design/NpathComplexity:
enabled: false
Naming/LongVariable:
enabled: false
Naming/ShortVariable:
enabled: false
order-alphabetical:
enabled: false
exclude_patterns:
- "api_explorer/*"
- "build/*"
- "client/css/converse.css"
- "client/js/libs/*"
- "server/php/libs/vendors/**/*"
1 change: 1 addition & 0 deletions .htpassword
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
restya:$apr1$DQIHRX5N$5N4aWaY7ozpbjsf.NAnR3.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ sudo ./restyaboard.sh
* Change admin email and password
* To add/reply cards via email, visit `/#/settings/10` to configure IMAP settings

### NGINX Rate Limiting Configuration

* You can configure the Nginx rate limit for Restyaboard by following the instructions from the documentation link [https://restya.com/board/docs/restyaboard-nginx-reverse-proxy-configuration/#configuration-of-rate-limiting-on-nginx](https://restya.com/board/docs/restyaboard-nginx-reverse-proxy-configuration/#configuration-of-rate-limiting-on-nginx)

### Diagnose Configuration

* You can enable the password authentication for the diagnose page by following the instructions from the documentation link [https://restya.com/board/docs/restyaboard-nginx-reverse-proxy-configuration/#configuration-of-diagnose-with-password-authentication](https://restya.com/board/docs/restyaboard-nginx-reverse-proxy-configuration/#configuration-of-diagnose-with-password-authentication)

### Forum

* [Restya Google Group](https://groups.google.com/d/forum/restya)
Expand Down
2 changes: 1 addition & 1 deletion client/css/bootstrap-datetimepicker.min.css
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
.datetimepicker table tr td.today:hover,
.datetimepicker table tr td.today.disabled,
.datetimepicker table tr td.today.disabled:hover {
background-color: ##f47564;
background-color: #f47564;
/*background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
Expand Down
2 changes: 1 addition & 1 deletion client/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var R_MLDAP_LOGIN_HANDLE = '';
var R_MLDAP_SERVERS = '';
var last_activity = '';
var previous_date = '';
var SecuritySalt = 'e9a556134534545ab47c6c81c14f06c0b8sdfsdf';
const SecuritySalt = 'e9a556134534545ab47c6c81c14f06c0b8sdfsdf';
var last_user_activity_id = 0,
load_more_last_board_activity_id = 0,
last_board_activity_id = 0,
Expand Down
19 changes: 11 additions & 8 deletions diagnose.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,20 @@
}
}
function _is_writable_recursive($dir) {
if (!($folder = @opendir($dir))) {
return false;
}
while ($file = readdir($folder)) {
if ($file != '.' && $file != '..' && (!is_writable($dir . '/' . $file) || (is_dir($dir . '/' . $file) && !_is_writable_recursive($dir . '/' . $file)))) {
closedir($folder);
if (is_dir($dir)){
$folder = opendir($dir);
if (!($folder)) {
return false;
}
while (($file = readdir($folder)) !== false) {
if ($file != '.' && $file != '..' && (!is_writable($dir . '/' . $file) || (is_dir($dir . '/' . $file) && !_is_writable_recursive($dir . '/' . $file)))) {
closedir($folder);
return false;
}
}
closedir($folder);
return true;
}
closedir($folder);
return true;
}
if (file_exists(APP_PATH . '/client/apps/r_ldap_login/app.json')) {
$is_having_ldap_plugin = true;
Expand Down
50 changes: 47 additions & 3 deletions docs/restyaboard-nginx-reverse-proxy-configuration.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,60 @@
---
description: Restyaboard Configuration, here you can check Configuration of Restyaboard on an NGINX Reverse proxy
description: Restyaboard Configuration, here you can check Configuration of Restyaboard on an NGINX
---

# Configuration of Restyaboard on an NGINX Reverse proxy
# Configuration of Restyaboard on an NGINX

## Configuration of Restyaboard on an NGINX Reverse proxy

* For configuring Restyaboard on a Nginx Reverse proxy, you have to set Host header:

**Example**

```
location / {
proxy_set_header Host $host; # important
proxy_pass http://localhost:8000;
}
```

## Configuration of rate limiting on Nginx

* You can limit the request on the Nginx configuration by adding limit request on the configuration file

**Example**
```
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
```

* Also, you need to add the limit request on the `location` block

**Example**
```
location / {
limit_req zone=mylimit;
}
```

## Configuration of Diagnose with password authentication

* You can enable the password authentication for the diagnose page by adding the below lines

**Example**
```
location /diagnose.php {
auth_basic "Restricted Area";
auth_basic_user_file /usr/share/nginx/html/.htpasswd;
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
```

* You can configure the password authentication for the diagnose page in the Apache server by following the instructions from the [link](https://stackoverflow.com/a/8275094)

* You can check the status of the Restyaboard in the diagnose and you can access the diagnose page using the username `restya`, password `restya123`

* You can also configure the different password in the Nginx server configuration for the diagnose page by following the instructions from the link [https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/](https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/)

* You can also configure the different password in the Apache server configuration for the diagnose page by following the instructions from the link [https://www.web2generators.com/apache-tools/htpasswd-generator](https://www.web2generators.com/apache-tools/htpasswd-generator)
2 changes: 1 addition & 1 deletion restyaboard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server {
location ^~ /media {
deny all;
}

location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
Expand Down
Loading

0 comments on commit 914ecc0

Please sign in to comment.