Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/openmage/nginx-admin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ server {
}
location /errors/ {
root /var/www/html;
location ~* \.(!(css|jpg|jpeg|gif|png|ico|webp))$ { return 404; }
location ~* \.(?!(css|jpg|jpeg|gif|png|ico|webp)$)[a-z]+$ { return 404; }
}
location /api/ {
rewrite ^/api/(.+?)/(.+)$ /api.php?type=$1&$args last;
Expand Down
5 changes: 3 additions & 2 deletions dev/openmage/nginx-frontend.conf
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,13 @@ server {
}
location /errors/ {
root /var/www/html;
location ~* \.(!(css|jpg|jpeg|gif|png|ico|webp))$ { return 404; }
location ~* \.(?!(css|jpg|jpeg|gif|png|ico|webp)$)[a-z]+$ { return 404; }
}

# Non-rewritten URLs, Admin and API are disabled for frontend
location /index.php/ { return 404; }
location ~ ^/admin(?:/(.*))?$ { return 404; }
location /api/ { return 404; }
location /api.php { return 404; }

# Clients use the frontend to call API
#location /api {
Expand All @@ -166,8 +165,10 @@ server {
location ~ /\. { return 404; }

# Ignore the files that are needed only for Apache
location = /api.php { return 404; }
location = /get.php { return 404; }
location = /install.php { return 404; }
location = /index.php { return 404; }

# Custom error handlers
error_page 404 = @php-404;
Expand Down