Last active
April 30, 2016 11:22
-
-
Save auggod/019aa5eee8ef618dcf65678e4649d8a7 to your computer and use it in GitHub Desktop.
Get around Soundcloud Safari, iOS bug. See issue: https://github.com/soundcloud/soundcloud-javascript/issues/27
This file contains 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
server { | |
listen 443; | |
ssl on; | |
ssl_certificate /etc/ssl/certs/tracklist.crt; | |
ssl_certificate_key /etc/ssl/private/tracklist.key; | |
server_name proxy.yourapp.com; | |
location / { | |
allow all; | |
proxy_set_header X_FORWARDED_PROTO https; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Url-Scheme $scheme; | |
proxy_redirect off; | |
proxy_max_temp_file_size 0; | |
proxy_http_version 1.1; | |
proxy_pass http://localhost:8081; | |
} | |
} |
This file contains 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
const request = require('request') | |
const express = require('express') | |
const cors = require('cors') | |
const app = express() | |
app.use(cors()) | |
app.get('/', (req, res) => { | |
var url = req.query.url | |
request({ method: 'GET', | |
uri: url, | |
gzip: true, | |
json: true | |
}, (error, response, body) => { | |
if (error) throw error | |
res.json(body) | |
}) | |
}) | |
app.listen(8081) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment