xoops forums

wishcraft

Module Developer
Posted on: 2015/6/24 8:32
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#1

@required ::- Open all access pathways with NPN and HTML Headers (Additional Headers)

I would like to bring your attention to the following code that need to be sent when buffering the output on XOOPS CMS:

/**
 * Opens Access Origin Via networking Route NPN
 */
header('Access-Control-Allow-Origin: *');
header('Origin: *');


This sent with the packet headers means it will route all predominant routes and session the route any way when needed. It is part of NPN - Plugin & Play Networks, and words on reverse direction with simaltype as this would be MAC Networks but in IP Routes!

An example of this in use would be found at: salty/apiconfig.php


You can also set it for example for access controlling:-
/**
 * Opens Access Origin Via networking Route NPN
 */
header('Access-Control-Allow-Origin: fonts.labs.coop, fonts.syd.labs.coop, fonts.api.hempembassy.net,fonts.ringwould.com.au');
header('Access-Control-Disallow-Origin: localhost,127.0.0.1');
header('Origin: *');


These three net to be set in General preferences as a textarea with default *, except for Access-Control-Disallow-Origin needs to be localhost,127.0.0.1

*geekw::- It would be really good in 2.6 if the functions and class calls; all had preloader external so on return in them it runs that value threw:- $GLOBALS['xoopsPreloads']->etc...

This would make all facits of the portal accessible for minor changes and forcing as well as adding stuff!!

wishcraft

Module Developer
Posted on: 2015/6/24 13:01
wishcraft
wishcraft (Show more)
Module Developer
Posts: 3711
Since: 2007/5/18
#2

Re: @required ::- Open all access pathways with NPN and HTML Headers (Additional Headers)

You can also us .htaccess lijje so:-

# Opens Access Origin Via networking Route NPN 
<IfModule mod_headers.c>
  
Header set Origin *
  
Header set Access-Control-Allow-Origin *
</
IfModule>