Skip to content

Commit

Permalink
Nginx Conf Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sak1012 committed Nov 10, 2024
1 parent 40f248d commit d17fcfc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
17 changes: 0 additions & 17 deletions deployment/docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,6 @@ http {
server_name _;
index index.php index.html;
root /var/www;

add_header 'Access-Control-Allow-Origin' 'https://checkin.eventyay.com' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE' always;
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,exhibitor' always;

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'https://checkin.eventyay.com' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE' always;
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,exhibitor' always;
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}

location /media/ {
alias /data/media/;
Expand Down Expand Up @@ -91,4 +75,3 @@ http {
}
}


2 changes: 1 addition & 1 deletion src/pretix/api/views/checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def post(self, request, *args, **kwargs):
)


class CheckinRPCSearchView(ListAPIView):
class CheckinSearchView(ListAPIView):
serializer_class = CheckinListOrderPositionSerializer
queryset = OrderPosition.all.none()
filter_backends = (ExtendedBackend, RichOrderingFilter)
Expand Down
3 changes: 1 addition & 2 deletions src/pretix/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
DATABASE_ROUTERS = ['pretix.helpers.database.ReplicaRouter']

BASE_PATH = ""
BASE_PATH = config.get('pretix', 'base_path', fallback='/tickets')

FORCE_SCRIPT_NAME = BASE_PATH

Expand Down Expand Up @@ -373,7 +373,6 @@
}

MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'pretix.api.middleware.IdempotencyMiddleware',
'pretix.multidomain.middlewares.MultiDomainMiddleware',
Expand Down

0 comments on commit d17fcfc

Please sign in to comment.