diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/XMLHttpRequest/resources/auth8 | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/XMLHttpRequest/resources/auth8')
-rw-r--r-- | testing/web-platform/tests/XMLHttpRequest/resources/auth8/corsenabled-no-authorize.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/web-platform/tests/XMLHttpRequest/resources/auth8/corsenabled-no-authorize.py b/testing/web-platform/tests/XMLHttpRequest/resources/auth8/corsenabled-no-authorize.py new file mode 100644 index 000000000..cb40efb08 --- /dev/null +++ b/testing/web-platform/tests/XMLHttpRequest/resources/auth8/corsenabled-no-authorize.py @@ -0,0 +1,20 @@ +import imp +import os + +def main(request, response): + response.headers.set('Access-Control-Allow-Origin', request.headers.get("origin")); + response.headers.set('Access-Control-Allow-Credentials', 'true'); + response.headers.set('Access-Control-Allow-Methods', 'GET'); + response.headers.set('Access-Control-Allow-Headers', 'x-user, x-pass'); + response.headers.set('Access-Control-Expose-Headers', 'x-challenge, xhr-user, ses-user'); + auth = imp.load_source("", os.path.join(os.path.abspath(os.curdir), + "XMLHttpRequest", + "resources", + "authentication.py")) + if request.method == "OPTIONS": + return "" + else: + return auth.main(request, response) + + + |