Resource icon

xF2 Add-on Custom HTTP Client headers 1.0.0 Alpha

No permission to download
Compatible XF Versions
  1. 2.2
Additional Requirements
PHP 7.1 or newer
This simple add-on just allows add/set custom headers to all HTTP requests from XenForo via src/config.php. For example, you may want set Accept-Language for using another language, if remote web-resource respects this header.

Example usage (src/config.php):

PHP:
<?php

// database options ...
// additional options for caching (for example), proxying all HTTP requests and another...

$config['http']['headers'] = [
    // Prefers russian language; if not present - then english or any another language
    // More details: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language
    'Accept-Language' => 'ru, en;q=0.9, *:q=0.5'
];
  • Like
Reactions: Thunderbolts
Author
AnimeHaxor
Size
11.4 KB
Extension
zip
Downloads
3
Views
1,074
First release
Last update

More resources from AnimeHaxor

Similar resources

Customize your 404 error page, keep track of missing URLs and redirect them to new pages.
0.00 star(s) 0 ratings
Downloads
31
Updated
This addon allows you to set permissions for Custom Fields:
0.00 star(s) 0 ratings
Downloads
6
Updated
Custom Fields Permissions AnimeHaxor
Set input/output permissions for Custom User/Thread Fields
0.00 star(s) 0 ratings
Downloads
26
Updated
Create custom PHP pages with or without the XF layout.
0.00 star(s) 0 ratings
Downloads
4
Updated
Custom Style Option Group Colors Picker AnimeHaxor
Add colors from your custom style options to color picker
0.00 star(s) 0 ratings
Downloads
3
Updated