Skip to content

weaver-design/Dreamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dreamer

A site deved by wued

https://wued-dreamer.netlify.com/

Netlify Status

Nginx

server {
    listen       80;
    set $my_server http://127.0.0.0:1337; 

    location / {
        proxy_pass /home/ubuntu/Dreamer;
    }

    location /api/ {
        proxy_pass $my_server;
    }
    
    location /teams/ {
        proxy_pass $my_server;
    }
    
    location /admin/ {
        proxy_pass $my_server;
    }
}

Live Server Proxy

{
  "liveServer.settings.port": 5500,
  "liveServer.settings.proxy": {
    "enable": true,
    "baseUri": "/teams", // 从某路径下开始全量代理
    "proxyUri": "http://47.99.54.213:1337/teams" // 代理服务地址
  }
}

Ajax

$.get('/teams', function(res) {
    console.log(res)
})

Nginx

location ~^/api/[^\/]+/[^\/]+ {   rewrite ^(/api)(.*)$ $2 break;   proxy_pass $my_server; }