Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
16.7 Legacy Series
»
Captive Portal - PHP custom template
« previous
next »
Print
Pages: [
1
]
Author
Topic: Captive Portal - PHP custom template (Read 37775 times)
tux.JCC
Newbie
Posts: 6
Karma: 0
Captive Portal - PHP custom template
«
on:
November 01, 2017, 04:13:51 pm »
Hello!
We trying to use a template with an index.html that POST some data to a backend written in PHP, this is working on a pfSense 2.2.X but on OPN simply don't execute the PHP code. I already tried to load fastcgi on the lighty conf file but still not working... any clues?
Logged
AdSchellevis
Administrator
Hero Member
Posts: 907
Karma: 184
Re: Captive Portal - PHP custom template
«
Reply #1 on:
November 01, 2017, 06:46:40 pm »
Our captive portal is a very different solution then the one pfSense has, scripting (other then Javascript in the browser) is not allowed on the pages served to the end user for security reasons.
You best read the docs first for a better understanding of the theme functionality
https://docs.opnsense.org/manual/captiveportal.html
Custom functionality has to be hooked into the API, just like the authentication is done (for reference
https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/controllers/OPNsense/CaptivePortal/Api/AccessController.php
)
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
16.7 Legacy Series
»
Captive Portal - PHP custom template