27 lines
1,023 B
Text
27 lines
1,023 B
Text
|
|
||
|
server {
|
||
|
listen 443 ssl;
|
||
|
server_name feed.zenoverse.net;
|
||
|
ssl_certificate /etc/letsencrypt/live/feed.zenoverse.net/fullchain.pem;
|
||
|
ssl_certificate_key /etc/letsencrypt/live/feed.zenoverse.net/privkey.pem;
|
||
|
location / {
|
||
|
index index.html;
|
||
|
root /main/scratch-feed;
|
||
|
}
|
||
|
location ~ /user/(.*) {
|
||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||
|
proxy_pass https://api.scratch.mit.edu/users/$1/projects?limit=40;
|
||
|
}
|
||
|
location ~ /studio/(.*) {
|
||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||
|
proxy_pass https://api.scratch.mit.edu/studios/$1;
|
||
|
}
|
||
|
location ~ /studio_project/(.*) {
|
||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||
|
proxy_pass https://api.scratch.mit.edu/studios/$1/projects?offset=0&limit=40;
|
||
|
}
|
||
|
location ~ /studio_comment/(.*) {
|
||
|
add_header 'Access-Control-Allow-Origin' '*';
|
||
|
proxy_pass https://api.scratch.mit.edu/studios/$1/comments?offset=0&limit=40;
|
||
|
}
|
||
|
}
|