Skip to content

Commit 59ee2be

Browse files
committed
fix: set CORS error content type to text/html by default
refs #385
1 parent 778cbc4 commit 59ee2be

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ These variables are common to image variants and will set defaults based on the
220220
| -------- | ------------------------------------------------------------------- |
221221
| CORS_HEADER_403_ALLOW_ORIGIN | The value of the [Access-Control-Allow-Origin](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) header for `403` responses. Determines which origins can access the response. (Default: `"*"`). |
222222
| CORS_HEADER_403_ALLOW_METHODS | The value of the [Access-Control-Request-Method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Request-Method) header for `403` responses. Determines the allowed request methods for the resource. Default: `"GET, POST, PUT, DELETE, OPTIONS"` |
223-
| CORS_HEADER_403_CONTENT_TYPE | The value of the `Content-Type` header for `403` responses. Default: (`"text/plain"`) |
223+
| CORS_HEADER_403_CONTENT_TYPE | The value of the `Content-Type` header for `403` responses. Default: (`"text/html"`) |
224224
| CORS_HEADER_403_MAX_AGE | The value of the [Access-Control-Max-Age](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age) header for `403` responses. The number of seconds that preflight requests for this resource may be cached by the browser. (Default: `3600`) |
225225
| DNS_SERVER | Deprecated. Use `RESOLVERS`.
226226
| HTTP2 | A string value indicating whether HTTP/2 should be enabled (for all locations) (Allowed values: `on`, `off`. Default: `on`) |

nginx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ ENV \
134134
BACKEND=http://localhost:80 \
135135
CORS_HEADER_403_ALLOW_ORIGIN="*" \
136136
CORS_HEADER_403_ALLOW_METHODS="GET, POST, PUT, DELETE, OPTIONS" \
137-
CORS_HEADER_403_CONTENT_TYPE="text/plain" \
137+
CORS_HEADER_403_CONTENT_TYPE="text/html" \
138138
CORS_HEADER_403_MAX_AGE=3600 \
139139
CORS_HEADER_ACCESS_CONTROL_ALLOW_HEADERS="*" \
140140
ERRORLOG=/var/log/nginx/error.log \

0 commit comments

Comments
 (0)