commit
b2dbe4bdb4
|
@ -0,0 +1 @@
|
||||||
|
- Add abuse report configuration
|
5
dc
5
dc
|
@ -13,6 +13,11 @@ for i in $(seq 1 ${#PORTAL_MODULES}); do
|
||||||
COMPOSE_FILES+=" -f docker-compose.mongodb.yml -f docker-compose.accounts.yml"
|
COMPOSE_FILES+=" -f docker-compose.mongodb.yml -f docker-compose.accounts.yml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# blocker module - alias "b"
|
||||||
|
if [[ ${PORTAL_MODULES:i-1:1} == "b" ]]; then
|
||||||
|
COMPOSE_FILES+=" -f docker-compose.blocker.yml"
|
||||||
|
fi
|
||||||
|
|
||||||
# jaeger module - alias "j"
|
# jaeger module - alias "j"
|
||||||
if [[ ${PORTAL_MODULES:i-1:1} == "j" ]]; then
|
if [[ ${PORTAL_MODULES:i-1:1} == "j" ]]; then
|
||||||
COMPOSE_FILES+=" -f docker-compose.jaeger.yml"
|
COMPOSE_FILES+=" -f docker-compose.jaeger.yml"
|
||||||
|
|
|
@ -41,6 +41,8 @@ services:
|
||||||
- SKYNET_ACCOUNTS_LOG_LEVEL=${SKYNET_ACCOUNTS_LOG_LEVEL}
|
- SKYNET_ACCOUNTS_LOG_LEVEL=${SKYNET_ACCOUNTS_LOG_LEVEL}
|
||||||
- KRATOS_ADDR=${KRATOS_ADDR}
|
- KRATOS_ADDR=${KRATOS_ADDR}
|
||||||
- OATHKEEPER_ADDR=${OATHKEEPER_ADDR}
|
- OATHKEEPER_ADDR=${OATHKEEPER_ADDR}
|
||||||
|
volumes:
|
||||||
|
- ./docker/accounts/conf:/accounts/conf
|
||||||
expose:
|
expose:
|
||||||
- 3000
|
- 3000
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
x-logging: &default-logging
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
blocker:
|
||||||
|
build:
|
||||||
|
context: ./docker/blocker
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: blocker
|
||||||
|
restart: unless-stopped
|
||||||
|
logging: *default-logging
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
expose:
|
||||||
|
- 4000
|
||||||
|
networks:
|
||||||
|
shared:
|
||||||
|
ipv4_address: 10.10.10.102
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
- sia
|
|
@ -0,0 +1,16 @@
|
||||||
|
FROM golang:1.16.7
|
||||||
|
LABEL maintainer="NebulousLabs <devs@nebulous.tech>"
|
||||||
|
|
||||||
|
ENV GOOS linux
|
||||||
|
ENV GOARCH amd64
|
||||||
|
|
||||||
|
ARG branch=main
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
RUN git clone --single-branch --branch ${branch} https://github.com/SkynetLabs/blocker.git && \
|
||||||
|
cd blocker && \
|
||||||
|
go mod download && \
|
||||||
|
make release
|
||||||
|
|
||||||
|
ENTRYPOINT ["blocker"]
|
|
@ -90,6 +90,29 @@ location /health-check {
|
||||||
proxy_pass http://10.10.10.60:3100; # hardcoded ip because health-check waits for nginx
|
proxy_pass http://10.10.10.60:3100; # hardcoded ip because health-check waits for nginx
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /abuse/ {
|
||||||
|
if ($request_method = 'OPTIONS') {
|
||||||
|
add_header 'Access-Control-Allow-Origin' 'https://0404guluqu38oaqapku91ed11kbhkge55smh9lhjukmlrj37lfpm8no.siasky.net';
|
||||||
|
|
||||||
|
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||||
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
||||||
|
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
|
||||||
|
|
||||||
|
# pre-flight info is valid for 20 days
|
||||||
|
add_header 'Access-Control-Max-Age' 1728000;
|
||||||
|
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||||
|
add_header 'Content-Length' 0;
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
|
|
||||||
|
proxy_pass http://10.10.10.102:4000/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /report-abuse {
|
||||||
|
# TODO: do a proxy_pass
|
||||||
|
return https://0404guluqu38oaqapku91ed11kbhkge55smh9lhjukmlrj37lfpm8no.siasky.net;
|
||||||
|
}
|
||||||
|
|
||||||
location /hns {
|
location /hns {
|
||||||
# match the request_uri and extract the hns domain and anything that is passed in the uri after it
|
# match the request_uri and extract the hns domain and anything that is passed in the uri after it
|
||||||
# example: /hns/something/foo/bar matches:
|
# example: /hns/something/foo/bar matches:
|
||||||
|
|
Reference in New Issue