1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00

Merge pull request #72 from YunoHost-Apps/autopatch-http_host

[autopatch] Fix Host and X-Forwarded-For header spoofing
This commit is contained in:
yalh76 2023-07-27 21:26:58 +02:00 committed by GitHub
commit ee8ebc3509
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 22 deletions

View file

@ -5,7 +5,8 @@ It shall NOT be edited by hand.
# Distbin for YunoHost # Distbin for YunoHost
[![Integration level](https://dash.yunohost.org/integration/distbin.svg)](https://dash.yunohost.org/appci/app/distbin) ![](https://ci-apps.yunohost.org/ci/badges/distbin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/distbin.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/distbin.svg)](https://dash.yunohost.org/appci/app/distbin) ![Working status](https://ci-apps.yunohost.org/ci/badges/distbin.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/distbin.maintain.svg)
[![Install Distbin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=distbin) [![Install Distbin with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=distbin)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -34,7 +35,7 @@ A networked place to store posted web documents. This is meant to allow for dist
## Screenshots ## Screenshots
![](./doc/screenshots/screenshot.PNG) ![Screenshot of Distbin](./doc/screenshots/screenshot.PNG)
## Disclaimers / important information ## Disclaimers / important information
@ -42,20 +43,21 @@ A networked place to store posted web documents. This is meant to allow for dist
## Documentation and resources ## Documentation and resources
* Official app website: https://distbin.com/about * Official app website: <https://distbin.com/about>
* Upstream app code repository: https://github.com/gobengo/distbin * Upstream app code repository: <https://github.com/gobengo/distbin>
* YunoHost documentation for this app: https://yunohost.org/app_distbin * YunoHost documentation for this app: <https://yunohost.org/app_distbin>
* Report a bug: https://github.com/YunoHost-Apps/distbin_ynh/issues * Report a bug: <https://github.com/YunoHost-Apps/distbin_ynh/issues>
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/distbin_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/distbin_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug
or or
sudo yunohost app upgrade distbin -u https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug sudo yunohost app upgrade distbin -u https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,15 +1,20 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# Distbin pour YunoHost # Distbin pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/distbin.svg)](https://dash.yunohost.org/appci/app/distbin) ![](https://ci-apps.yunohost.org/ci/badges/distbin.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/distbin.maintain.svg) [![Niveau dintégration](https://dash.yunohost.org/integration/distbin.svg)](https://dash.yunohost.org/appci/app/distbin) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/distbin.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/distbin.maintain.svg)
[![Installer Distbin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=distbin) [![Installer Distbin avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=distbin)
*[Read this readme in english.](./README.md)* *[Read this readme in english.](./README.md)*
*[Lire ce readme en français.](./README_fr.md)*
> *Ce package vous permet d'installer Distbin rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet dinstaller Distbin rapidement et simplement sur un serveur YunoHost.
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
## Vue d'ensemble ## Vue densemble
A distributed pastebin. i.e. it is a service where anyone can post things on the web, and others can react by posting anywhere else on the web (including here). A distributed pastebin. i.e. it is a service where anyone can post things on the web, and others can react by posting anywhere else on the web (including here).
@ -28,9 +33,9 @@ A networked place to store posted web documents. This is meant to allow for dist
**Démo :** https://distbin.com/ **Démo :** https://distbin.com/
## Captures d'écran ## Captures décran
![](./doc/screenshots/screenshot.PNG) ![Capture décran de Distbin](./doc/screenshots/screenshot.PNG)
## Avertissements / informations importantes ## Avertissements / informations importantes
@ -38,20 +43,21 @@ A networked place to store posted web documents. This is meant to allow for dist
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : https://distbin.com/about * Site officiel de lapp : <https://distbin.com/about>
* Dépôt de code officiel de l'app : https://github.com/gobengo/distbin * Dépôt de code officiel de lapp : <https://github.com/gobengo/distbin>
* Documentation YunoHost pour cette app : https://yunohost.org/app_distbin * Documentation YunoHost pour cette app : <https://yunohost.org/app_distbin>
* Signaler un bug : https://github.com/YunoHost-Apps/distbin_ynh/issues * Signaler un bug : <https://github.com/YunoHost-Apps/distbin_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/distbin_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/distbin_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade distbin -u https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug sudo yunohost app upgrade distbin -u https://github.com/YunoHost-Apps/distbin_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps **Plus dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>

View file

@ -4,7 +4,7 @@ location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__/; proxy_pass http://127.0.0.1:__PORT__/;
proxy_pass_request_headers on; proxy_pass_request_headers on;
proxy_redirect ~^/(.*) $scheme://$http_host__PATH__/$1; proxy_redirect ~^/(.*) $scheme://$http_host__PATH__/$1;
proxy_set_header Host $http_host; proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;