From 0e68bfc9ac53388d6e33f40ce006f835e31ea5eb Mon Sep 17 00:00:00 2001 From: Eike Kettner Date: Sat, 22 May 2021 00:43:32 +0200 Subject: [PATCH] Add info about sharex, document base-url --- artwork/icon-dark-squared.png | Bin 0 -> 4812 bytes artwork/icon-dark-squared.svg | 138 ++++++++++++++++++ modules/microsite/docs/doc/configure.md | 16 +- modules/microsite/docs/doc/reverseproxy.md | 14 +- modules/microsite/docs/doc/sharex.md | 32 ++++ .../main/resources/microsite/data/menu.yml | 3 + 6 files changed, 194 insertions(+), 9 deletions(-) create mode 100644 artwork/icon-dark-squared.png create mode 100644 artwork/icon-dark-squared.svg create mode 100644 modules/microsite/docs/doc/sharex.md diff --git a/artwork/icon-dark-squared.png b/artwork/icon-dark-squared.png new file mode 100644 index 0000000000000000000000000000000000000000..91a815d5f107158455e0abb914e360bc55887693 GIT binary patch literal 4812 zcmV;-5;N_IP)u?P0g5+|;c)Nx{h7rX?F4LE>}jR6ZJfsiyantAX3`p1lf zAP5AK-jmvV&Y3fB<}JV9ec!j-?RT#*2uM~}4{gVtVvS5S=oD4GK#)-i=K&)D56E=c zr4jTHDh&v4iR#N9`ch)($TyP7qzxt&r$&Ny;ACoQYT_}?U8%x!f$0{m5tsld@Gh_m zkvCBq5zT_Op^`;3B1*AB95JP+j#ro@FdlFK1e$;+E&8}b?N1+g;GrV{CY6Fu!E^6j zcTEa~yxXucQ-vFWC}@j_Jgcx#RG!HYda16iE`7GguBxhvmN<5bA~&nyHk2C+t32Q} zV3Vjk9Zj`AkzBt%)tBk&34sYvUH#diF)3LMb~?yp&=ypl7NfsXPdCQOM*b$5OuBt- zci!Bp8Af$2a3zKGD{|Da?jJ5%_0X$*ZSPD3BEbCW%G*SuKTuT%q|Pz+iO7%<8Px5kQ2Uy|LL_ z0uex=TmXb4C}lvU5mQ-PGiR5o{6t{0QTO$yoAVy%7IZ`&u6bE2;RR*>n*WHOi>p`XU8s;Z&_mjZ6AEVa!~+oxjr z^5t#7Z-Jt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%5^&donJHi4nh7CKtw8g z5_FNQtW2a6;m?V156A^wR%J!GfAPw-OZy`&XJR0|gk^qp)l5OJML8lyzOneLYv!JE zLp4IaWd^I-cB*YoCb@onJMg_kBJunOZ@l&|-aq-`&l=;D0}&OL+&8x>vv|dt)qR$l z9x@;VSWrFtN>9v8!TZhwb?bg|#vKgNj(!kEPdiLy8TmPfE6B&6nN%vpkDq*M^XuE+ z*!j`h|M(xH(O3n5sxDnPch+NmPb?I4IY4UX&ROUgxj$YyY*Aql)iYwPj_X+VoD=Q< zhy1)?9{~OgxD}WR4Ckb@zV*(#4bNc_jl8V19MgZJl#QI{D!WdP|f$st={L<|4p5>~J-xrS^ zRzd!1JtG-QD^@>!#+~|!K!&Ti<-@ma$+frLAjkv&fj_$L+H1V?#+|=u`}Xbq+Q^=qHLE!7 zrN0AQhRCf;>ef8lpZ3l~V3l$6=FKZHxzx{qE>p?svtrB_`fCXJ`89Jc73Dt!*%-xH zFc2au1Fa3Msi}!aB$pKBOB}x&Ey&}juHLi1{#P3|Z0L32sH&?;ODb@YO}zc|gB&^@4^0wP^j9YW+sSbm{uHZ57T>Ybh(FPTh6vPTb3Rl`lH z+$5N^wffB^tJeOE0T#|QAOz@OL3Q + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/microsite/docs/doc/configure.md b/modules/microsite/docs/doc/configure.md index 338aa7b5..218ab63d 100644 --- a/modules/microsite/docs/doc/configure.md +++ b/modules/microsite/docs/doc/configure.md @@ -152,16 +152,22 @@ sharry.restserver.bind { By default, it binds to `localhost` and some predefined port. -### baseurl +### Base-url -The base url is an important setting that defines the http URL where -sharry can be reached. The REST server uses this url to create +The base url is an important setting that defines the URL where sharry +can be reached (the external url). The REST server uses it to create absolute urls and to configure the authenication cookie. These URLs are sent to the client, so they must resolve back to the sharry server. If you see "network error" error messages in the browser, then this setting is probably not correct. -By default it is build using the information from the `bind` setting. +By default it is set to `http://localhost:9090`. If you leave it at +`localhost`, then sharry uses the request to obtain the real external +url dynamically by inspecting http headers and finally falling back to +the `bind.address|port`. + +However, if you have a single external url, it is recommended to set +this here. #### Examples @@ -170,7 +176,7 @@ sharry.restserver.base-url = "https://sharry.example.com" ``` -### registration options +### Registration Options This defines if and how new users can create accounts. There are 3 options: diff --git a/modules/microsite/docs/doc/reverseproxy.md b/modules/microsite/docs/doc/reverseproxy.md index 840ddcc2..10697e6c 100644 --- a/modules/microsite/docs/doc/reverseproxy.md +++ b/modules/microsite/docs/doc/reverseproxy.md @@ -13,6 +13,7 @@ For the examples below, assume the following: - Sharry app is available at `192.168.1.11:9090`. - The external domain/hostname is `sharry.example.com` + ## Configuring Sharry These settings require a complement config part in the sharry @@ -37,9 +38,11 @@ configuration file: the server to every network interface. If it is running on the same machine as the reverse proxy server, you can set `localhost` instead. -- Sharry needs to know the external url. The `base-url` setting must - point to the external address. Using above values, it must be set to - `https://sharry.example.com`. +- Sharry needs to know the external url. The `base-url` can be used to + explicitely specify this url. If it is left at its default value, + sharry finds the external url from the request. It is recommended to + set this url, if you have a single external url. Using above values, + it must be set to `https://sharry.example.com`. ``` sharry.restserver { @@ -82,7 +85,10 @@ this site. This defines two servers: one listens for http traffic and redirects to the https variant. Additionally it defines the let's encrypt -`.well-known` folder name. +`.well-known` folder name. For more information about how to setup +let's encrypt, please refer to [their +documentation](https://letsencrypt.org/docs/) and/or the [nginx +documentation](https://nginx.org/en/docs/). The https server endpoint is configured with the let's encrypt certificates and acts as a proxy for the application at diff --git a/modules/microsite/docs/doc/sharex.md b/modules/microsite/docs/doc/sharex.md new file mode 100644 index 00000000..123c4ddc --- /dev/null +++ b/modules/microsite/docs/doc/sharex.md @@ -0,0 +1,32 @@ +--- +layout: docs +title: ShareX +permalink: doc/sharex +--- + +# {{ page.title }} + +[ShareX](https://getsharex.com/) is a popular screenshot tool. Below +is a "custom upload" template to allow uploading screenshots to Sharry +from ShareX. + + +``` +{ + "Version": "1.3.1", + "DestinationType": "ImageUploader, TextUploader, FileUploader", + "RequestMethod": "POST", + "RequestURL": "https://your.sharry/api/v2/alias/upload", + "Body": "MultipartFormData", + "Headers": { + "Sharry-Alias": "some-alias-id" + }, + "FileFormName": "file[]", + "URL": "https://your.sharry/app/upload/$json:id$" +} +``` + +You need to replace `http://your.sharry` with your sharry url and +specify some alias id, replacing `some-alias-id` in the example. The +[alias](webapp#alias-pages) id can be found at any alias page that you +have access to. diff --git a/modules/microsite/src/main/resources/microsite/data/menu.yml b/modules/microsite/src/main/resources/microsite/data/menu.yml index dcd3367d..11efb8eb 100644 --- a/modules/microsite/src/main/resources/microsite/data/menu.yml +++ b/modules/microsite/src/main/resources/microsite/data/menu.yml @@ -22,6 +22,9 @@ options: - title: Fail2ban url: doc/fail2ban + - title: ShareX + url: doc/sharex + - title: Configuring url: doc/configure