kadirahq / flow-router

Carefully Designed Client Side Router for Meteor
MIT License
1.09k stars 194 forks source link

Fix the url generation for prefixed paths #510

Closed mquandalle closed 8 years ago

mquandalle commented 8 years ago

Fixes #508

arunoda commented 8 years ago

Thanks.

arunoda commented 8 years ago

BTW: I was too quick.

508 is for the SSR branch. But this is for the master.

Is these related?

mquandalle commented 8 years ago

508 description misunderstood the root cause of the issue which was that path were generated incorrectly if used with base prefixes (either in master or ssr). It’s just that this bug became apparent when using ssr, but I also had it on Wekan (ie, master branch without ssr): https://github.com/wekan/wekan/issues/498. This was caused by a call to FlowRouter.url here.

arunoda commented 8 years ago

Okay. Got it. Could you port this to ssr as well? I'll take this in.

mquandalle commented 8 years ago

Also to reproduce the issue you can just lauch an app with FlowRouter 2.10.0:

$ ROOT_URL=http://localhost:3000/myapp meteor

and then run FlowRouter.url('path') on the browser console. You will get /myapp/myapp/path as the base prefix is added by both FlowRouter path() function and Meteor absoluteUrl method.

arunoda commented 8 years ago

Okay. Released for master as v2.10.1

tobleron commented 7 years ago

I solved the issue by doing the following on Ubuntu/Snap installation:

sudo vi /var/snap/wekan-ondra/common/wekan_settings.sh export ROOT_URL='http://192.168.43.115:7000' export PORT='7000' Then run it! ./wekan_settings.sh

All Good now! :)

xiaohelong commented 6 years ago

Chinese Language as follows wekan 看板系统(仿trello)0.49 虚拟机文件(virtualbox vmware images) https://drive.google.com/file/d/0B_ZOwu5Ug5UgS0VoZF9yNWJlcDQ/edit 0.49 virtualbox 虚拟文件下载,开箱即用。 我下载并安装试用,解决了存在的问题。ova支持vmware,百度云下载地址http://pan.baidu.com/s/1jHYeiMi

特别注意:在系统中需要设定ROOT变量为设定的ip或者域名,否则页面中很多地方会全是localhost 在/home/wekan/repos/run-wekan.sh中将ROOT_URL和端口改成本机IP和需要的端口即可解决页面很多链接是localhost基地址的问题。改完后,重启计算机。 contents from 0.49 virtualbox images source /home/wekan/repos/run-wekan.sh while true; do cd /home/wekan/repos/wekan/.build/bundle export MONGO_URL='mongodb://127.0.0.1:27017/admin'

Production: https://example.com/wekan

    # Local: http://localhost:3000
    export ipaddress=$(ifdata -pa eth0) #auto get ip here, 这是自动获取系统IP地址的命令,默认是注释掉的。
    export ROOT_URL='http://10.0.2.15' #set ip here
    export MAIL_URL='smtp://user:pass@mailserver.example.com:25/'
    # This is local port where Wekan Node.js runs, same as below on Caddyfile settings.
    export PORT=80
    node main.js

done