OPNsense
  • 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 24053 times)

tux.JCC

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
    • TrustUX Network Security
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: 850
  • Karma: 163
    • View Profile
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
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2