Last active
August 29, 2015 14:13
-
-
Save willscripted/0d4cb3f5380805edf04e to your computer and use it in GitHub Desktop.
Server for testing CORS configs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -----BEGIN CERTIFICATE REQUEST----- | |
| MIIBnzCCAQgCAQAwXzELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx | |
| ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEYMBYGA1UEAwwPYmV0 | |
| YS50YXBqb3kuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDtuGIDiuI7 | |
| 7W4RAc0pGwi0f906ie3zzt4zbBcrS6WHXm49TmQzd+alRS8QDKONgwKPPagmKp4Z | |
| p00laKphVrhIkXr+hiEEoypRlhyMKVLGfpQZhIqiYbFYbs4weCHTRpTQXXfmnOCw | |
| ZuL1jTzIvBaONwGsc1oSnXUBu4a9sfvj9QIDAQABoAAwDQYJKoZIhvcNAQELBQAD | |
| gYEAtP/dhSOv/Fo6vVRKFiKNaqroTa6Hi//JGosm7YubX5+n4ZwVJ4bpmzcJym5n | |
| FpuMKiXpqlNGGUQ4yEkSCkP+Ab1dnS6dAGi63wjsWeAgwAbQH0xlN4ovsJNBtHRz | |
| SUUZdA9wOs5tBAyGrEr6mTuO/kVKd24i3E1dZtxeUZKOQlo= | |
| -----END CERTIFICATE REQUEST----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head><title></title></head> | |
| <body> | |
| <h1>beta.tapjoy.com</h1> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -----BEGIN CERTIFICATE----- | |
| MIICNTCCAZ4CCQCyvuArHWl1zDANBgkqhkiG9w0BAQsFADBfMQswCQYDVQQGEwJB | |
| VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0 | |
| cyBQdHkgTHRkMRgwFgYDVQQDDA9iZXRhLnRhcGpveS5jb20wHhcNMTUwMTA3MTYw | |
| ODMwWhcNMTYwMTA3MTYwODMwWjBfMQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29t | |
| ZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRgwFgYD | |
| VQQDDA9iZXRhLnRhcGpveS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB | |
| AO24YgOK4jvtbhEBzSkbCLR/3TqJ7fPO3jNsFytLpYdebj1OZDN35qVFLxAMo42D | |
| Ao89qCYqnhmnTSVoqmFWuEiRev6GIQSjKlGWHIwpUsZ+lBmEiqJhsVhuzjB4IdNG | |
| lNBdd+ac4LBm4vWNPMi8Fo43AaxzWhKddQG7hr2x++P1AgMBAAEwDQYJKoZIhvcN | |
| AQELBQADgYEAnnVo85MItu35sep0tIr5kzN/PmZ+DhpugA8f49L6VAb9zgXs3b0U | |
| QeGG2gEbs93EdDk/+YAdxZcCTSwkrJkfElr6DoWFxVs9PbBiyCauZp094QPIsX+w | |
| VFCzApIwxY/pq7EJOC2xE6dEi2ZSdz5jji/XVQ2QDaDiiUoLQ9Vq30M= | |
| -----END CERTIFICATE----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "https-server", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "spdy": "^1.29.2" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -----BEGIN RSA PRIVATE KEY----- | |
| MIICXQIBAAKBgQDtuGIDiuI77W4RAc0pGwi0f906ie3zzt4zbBcrS6WHXm49TmQz | |
| d+alRS8QDKONgwKPPagmKp4Zp00laKphVrhIkXr+hiEEoypRlhyMKVLGfpQZhIqi | |
| YbFYbs4weCHTRpTQXXfmnOCwZuL1jTzIvBaONwGsc1oSnXUBu4a9sfvj9QIDAQAB | |
| AoGBAM5hcm6C5/CBLDqFptkWCFO0YpuM3dH6ejyIjgDfluDUYb7FzQZGBS7cxoQX | |
| hPK5l8JGFDK2czXwYnCk0q7ZO/jQQ9tI+K1r4h/4Hpq0UPkZQQFfuJpUg1UjJ80l | |
| Wrq1zmFRUqHFj1mr3oFVkoqeA3wU6IlniNdC3BBoEWzCqQHhAkEA97LAnuJl6zi2 | |
| IKDR6Ipy4rGjhd+O6T2Sms5B+SZ6CkErvcWOM+SQhlvco2N1G0ObN0Lobv5YWdl/ | |
| YxFUNH5HaQJBAPWwBPAMzkrPM4pnGnDRsmemrftGnl/K8wyJ+HhsHZ8Jqf9UrDt2 | |
| 3InmmYuXqYS6xOx+f/yE8neIeJ8wdvTWUq0CQQDnwZlWT9A6iMJnvvEH2dpqXvj4 | |
| PlcRxmmQbKHvw192jsmlct19kkLjY7oKKfmdO+FTkEe36kSyNL1q7QDTaL/ZAkAl | |
| YxzNPtWhsrhAJoJyiqageU/efheZsjOcQ96ozKMRUZIqBcOT5PmYjpvtDy4/wYA4 | |
| EOP/FGglYoIgj2p6xaadAkAVaXz3rnVQFpBUJkoL26/A9jahQSitGGYJhfeeZiYV | |
| 9xeVRldv/ltF2XT3PhKLN0g/LHAGE5TYm6KVC9TxV1J6 | |
| -----END RSA PRIVATE KEY----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| spdy = require('spdy') | |
| fs = require('fs') | |
| options = { | |
| key: fs.readFileSync(__dirname + '/rsa_key'), | |
| cert: fs.readFileSync(__dirname + '/my.crt'), | |
| ca: fs.readFileSync(__dirname + '/csr.pem'), | |
| # **optional** SPDY-specific options | |
| windowSize: 1024 * 1024, # Server's window size | |
| # **optional** if true - server will send 3.1 frames on 3.0 *plain* spdy | |
| autoSpdy31: false | |
| } | |
| server = spdy.createServer(options, (req, res) -> | |
| fs.createReadStream(__dirname + "/index.html").pipe(res) | |
| ) | |
| server.listen(443) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment