Changeset 32006


Ignore:
Timestamp:
May 10, 2017, 2:11:49 PM (2 weeks ago)
Author:
brainslayer
Message:

add Auth to Access-Control-Allow-Origin header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/modules/base.c

    r32004 r32006  
    466466                char *extra;
    467467                if (handler->extra_header)
    468                         asprintf(&extra, "Access-Control-Allow-Origin: *\r\nAccess-Control-Allow-Headers: Origin,X-RequestedWith,Content-Type,Range\r\nAccess-Control-Allow-Methods: GET,OPTIONS\r\nAccept-Ranges: *\r\n%s",
     468                        asprintf(&extra, "Access-Control-Allow-Origin: *\r\nAccess-Control-Allow-Headers: Origin,X-RequestedWith,Content-Type,Range,Authorization\r\nAccess-Control-Allow-Methods: GET,OPTIONS\r\nAccept-Ranges: *\r\n%s",
    469469                                 handler->extra_header);
    470470                else
    471                         asprintf(&extra, "Access-Control-Allow-Origin: *\r\nAccess-Control-Allow-Headers: Origin,X-RequestedWith,Content-Type,Range\r\nAccess-Control-Allow-Methods: GET,OPTIONS\r\nAccept-Ranges: *");
     471                        asprintf(&extra, "Access-Control-Allow-Origin: *\r\nAccess-Control-Allow-Headers: Origin,X-RequestedWith,Content-Type,Range,Authorization\r\nAccess-Control-Allow-Methods: GET,OPTIONS\r\nAccept-Ranges: *");
    472472                if (!strncasecmp(method, "OPTIONS", 7)) {
    473473                        send_headers(200, "Ok", extra, handler->mime_type, 0, NULL);
Note: See TracChangeset for help on using the changeset viewer.