Mercurial Hosting > luan
changeset 1609:268b2a26e8d7
minor - cors
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 09 May 2021 11:42:03 -0600 |
parents | f7e3adae4907 |
children | 94ea190714dd |
files | src/goodjava/webserver/handlers/BasicAuthHandler.java src/goodjava/webserver/handlers/HeadersHandler.java |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
diff -r f7e3adae4907 -r 268b2a26e8d7 src/goodjava/webserver/handlers/BasicAuthHandler.java --- a/src/goodjava/webserver/handlers/BasicAuthHandler.java Sat May 01 19:52:56 2021 -0600 +++ b/src/goodjava/webserver/handlers/BasicAuthHandler.java Sun May 09 11:42:03 2021 -0600 @@ -7,7 +7,7 @@ import goodjava.webserver.Status; -public class BasicAuthHandler implements Handler { +public final class BasicAuthHandler implements Handler { private final Handler handler; private final String realm; private final String match;
diff -r f7e3adae4907 -r 268b2a26e8d7 src/goodjava/webserver/handlers/HeadersHandler.java --- a/src/goodjava/webserver/handlers/HeadersHandler.java Sat May 01 19:52:56 2021 -0600 +++ b/src/goodjava/webserver/handlers/HeadersHandler.java Sun May 09 11:42:03 2021 -0600 @@ -29,6 +29,8 @@ && response.headers.get("X-Accel-Expires")==null ) response.headers.put("X-Accel-Expires","1"); + if( response.headers.get("Access-Control-Allow-Origin")==null ) + response.headers.put("Access-Control-Allow-Origin","*"); } return response; }