standardfile icon indicating copy to clipboard operation
standardfile copied to clipboard

How not to access directly with the root domain name

Open JadeVane opened this issue 5 years ago • 2 comments

How not to access directly with the root domain name?What I want just like this:

sn.doamin.com = the web version of standard notes sn.domain.com/api = the login api for standardfile

I want to use sn.doamin.com for the web version of standard notes, not for the dashboard of standardfile.

JadeVane avatar Apr 01 '20 04:04 JadeVane

Hi, here is an example for caddy from my server

example.com {
    log /var/log/caddy.log
    root /var/www/html
    gzip

    proxy /api localhost:8888 {
        transparent
    }

    cors / {
        origin            *
        methods           GET,POST,PUT,PATCH,DELETE,OPTIONS
        allow_credentials true
        exposed_headers   Access-Token,Client,UID
        allowed_headers   Authorization,Content-Type
    }

}

That way standardfile will only answer on /api routes

tectiv3 avatar Apr 02 '20 05:04 tectiv3

@tectiv3 I am very grateful for this, but I mainly use nginx now, I apologize for not making it clear in the issue sincerely.

I am not familiar with caddy. Could you help me write a configuration file for nginx?

And thank you for making this project. It help me a lot.

JadeVane avatar Apr 02 '20 08:04 JadeVane