• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFDebug display debug with load balancer or OneLogin creds

Community Beginner ,
Apr 10, 2018 Apr 10, 2018

Copy link to clipboard

Copied

Is it possible to control when ColdFusion outputs the debug information at the bottom of the page by something other than IP?  We moved our servers into AWS Cloud and they are going through load balancer, so all the IPs look the same to the server.  Plus we have folks working remotely, so their IPs keep changing.  We use OneLogin for authentication, and we can have a Developer role in there.  So we'd like to find a way to display all the debug at the bottom of the page only if a Developer is logged in.

Views

305

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 10, 2018 Apr 10, 2018

Copy link to clipboard

Copied

Yes, you can do this. You can enable debug output for all IPs, then programmatically disable it in Application.cfc/cfm.

<cfif ...>

     <cfsetting showdebugoutput="false">
</cfif>

ColdFusion Help | Controlling debugging information in CFML

You can use the X-Forwarded-For header to identify specific client IP addresses passed through the load balancer. Or you could look for other attributes and use those instead. I don't know anything about OneLogin specifically, but if it can be detected by the web server, you can filter in CF.

That said, there is a significant reduction in load capability once you enable debug output, and you should really only use it in development environments, or when you're trying to debug an urgent problem in production. You should definitely not do leave it enabled in production generally.

Dave Watts, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 10, 2018 Apr 10, 2018

Copy link to clipboard

Copied

I wonder if there is a ColdFusion API way to invoke the Debug output without having to open it up to all IPs first.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 10, 2018 Apr 10, 2018

Copy link to clipboard

Copied

LATEST

No, as far as I'm aware this is the only way. But it's not the opening it up that causes the server to perform poorly, it's just having debugging enabled for any user at all.

Dave Watts, Fig Leaf Software

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation