Fanstatic URLs without protocol and hostname?

5 views
Skip to first unread message

Thierry Florac

unread,
Oct 27, 2014, 11:48:42 AM10/27/14
to fans...@googlegroups.com
Hi,

I have an internal application using Fanstatic which is currently published throught HTTP.
This application is also going to be published outside of my company using a Web Application Firewall, throught HTTPS.
My question is simple: to simplify WAF configuration, is there any way to generate "absolute" resources URLs not including protocol and hostname?

Best regards,
Thierry

Jan-Jaap Driessen

unread,
Oct 27, 2014, 3:47:34 PM10/27/14
to fans...@googlegroups.com, Thierry Florac
Hi Thierry,

Did you try to use the base_url configuration option [1] to achieve
this? Setting this to '/' could achieve the behavior you are looking
for.

If this doesn't work, you could have some code in your request cycle
that modifies the NeededResources instance for that request based on
certain request variables (HTTPS yes/no) that you could pass in from
the configuration of an intermediate server. I don't know enough about
your stack to say something useful in that area.

Cheers,

JJ

1) http://www.fanstatic.org/en/1.0a5/configuration.html?highlight=base_url#base-url

Thierry Florac

unread,
Oct 28, 2014, 3:35:13 AM10/28/14
to Jan-Jaap Driessen, fans...@googlegroups.com
Hi,

I tried "base_url" configuration option and it finally works fine!
But you have to use an empty string instead of a "/"; otherwise you get "//" in front of resources URLs and it just doesn't work...

Many thanks,
Thierry

Reply all
Reply to author
Forward
0 new messages