Skip to content

Commit

Permalink
WebServices: add wildcard Access Control Allow Origin policy header
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed May 18, 2019
1 parent 04c84ca commit 14a03a7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ private void handle(Socket socket) throws IOException {
}
// Send out the content.
output.println("HTTP/1.0 " + response.resultCode + " OK");
output.println("Access-Control-Allow-Origin: *");
output.println("Content-Type: " + response.mimeType);
output.println("Content-Length: " + response.bytes.length);
output.println();
Expand Down Expand Up @@ -342,7 +343,7 @@ private void handle(Socket socket) throws IOException {
*
* @param output The output stream.
*/
private void writeServerError(PrintStream output) {
private void writeServerError(final PrintStream output) {
output.println("HTTP/1.0 500 Internal Server Error");
output.flush();
UserError.Log.e(TAG, "Internal server error reply");
Expand Down

0 comments on commit 14a03a7

Please sign in to comment.