mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
parent
b2a5225831
commit
1a81b18b9f
12321 changed files with 544385 additions and 6 deletions
|
@ -0,0 +1,10 @@
|
|||
import imp
|
||||
import os
|
||||
|
||||
here = os.path.split(os.path.abspath(__file__))[0]
|
||||
|
||||
def main(request, response):
|
||||
auth = imp.load_source("", os.path.join(here,
|
||||
"..",
|
||||
"authentication.py"))
|
||||
return auth.main(request, response)
|
|
@ -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', 'authorization, 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)
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue