Skip to content

Commit

Permalink
Add info about sharex, document base-url
Browse files Browse the repository at this point in the history
  • Loading branch information
eikek committed May 21, 2021
1 parent d47ba33 commit 0e68bfc
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 9 deletions.
Binary file added artwork/icon-dark-squared.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 138 additions & 0 deletions artwork/icon-dark-squared.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions modules/microsite/docs/doc/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
14 changes: 10 additions & 4 deletions modules/microsite/docs/doc/reverseproxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions modules/microsite/docs/doc/sharex.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions modules/microsite/src/main/resources/microsite/data/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ options:
- title: Fail2ban
url: doc/fail2ban

- title: ShareX
url: doc/sharex

- title: Configuring
url: doc/configure

Expand Down

0 comments on commit 0e68bfc

Please sign in to comment.