IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
Browse Source

Relaxed access to markdown api.

master
parent
commit
0ec78a32ca
2 changed files with 5 additions and 2 deletions
  1. +2
    -0
      example/gitea-disable/files/nginx.conf
  2. +3
    -2
      example/gitea/focker-compose.yml

+ 2
- 0
example/gitea-disable/files/nginx.conf View File

@@ -32,6 +32,8 @@ http {
if ($test = "settings_not-get") {
return 403;
}
rewrite ^/api/v1/repos/[^/]*/[^/]*/markdown$ $uri break;
rewrite ^/api/v1/markdown(/raw)?$ $uri break;
if ($test = "api_not-get") {
return 403;
}


+ 3
- 2
example/gitea/focker-compose.yml View File

@@ -22,12 +22,13 @@ jails:
ip4.addr: 127.0.8.1
exec.start: |
export IP4_ADDR=127.0.8.1 && \
export DOMAIN_NAME=xyz.com && \
export SCHEME=http && \
export DOMAIN_NAME=localhost:3001 && \
export GITEA_CONF=/usr/local/etc/gitea/conf/app.ini && \
chown git:git /var/db/gitea && \
sed -i -e "s/127.0.0.1/${IP4_ADDR}/g" $GITEA_CONF && \
sed -i -e "s/localhost/${DOMAIN_NAME}/g" $GITEA_CONF && \
crudini --set --inplace $GITEA_CONF server ROOT_URL https://${DOMAIN_NAME} && \
crudini --set --inplace $GITEA_CONF server ROOT_URL ${SCHEME}://${DOMAIN_NAME} && \
if [ ! -f /var/db/gitea/gitea.db ]; then \
su git -c 'gitea migrate -c $GITEA_CONF' && \
su git -c 'gitea admin -c $GITEA_CONF create-user --username admin1 --password "AdminAdmin1+" --email "invaliduser@nonexistentdomain.com" --admin'; \


Loading…
Cancel
Save