Goal | Return a text based object of the desired format |
Header name | x-fo-body-text |
Value syntax | { css | html | js | plain | indexhtml } |
Example | x-fo-body-text: css |
Goal | Define the response status code |
Header name | x-fo-statuscode-define |
Value syntax | { 0,999 } |
Example | x-fo-statuscode-define: 200 |
Goal | Show the request headers received by the origin |
Header name | x-fo-body-showrequestheaders |
Value syntax | { json | plain | html | xml } |
Example | x-fo-body-showrequestheaders: json |
Goal | Show the request body received by the origin |
Header name | x-fo-body-showrequestbody |
Value syntax | { plain } |
Example | x-fo-body-showrequestbody: plain |
Goal | Send relevant information through the response body (request headers received by the origin, origin IP, origin hostname, request method, URL) |
Header name | x-fo-body-info |
Value syntax | { json | plain | html | xml | help } |
Example | x-fo-body-info: json |
Goal | Return a compressed object in the required format |
Header name | x-fo-body-compressed |
Value syntax | { zip | gzip | bzip | deflate | br } |
Example | x-fo-body-compressed: gzip |
Goal | Return an image in the selected format |
Header name | x-fo-body-image |
Value syntax | { png | gif | jpeg } |
Example | x-fo-body-image: png |
Goal | Return a binary random object with the selected size in bytes |
Header name | x-fo-body-binary |
Value syntax | { Number_of_bytes } |
Example | x-fo-body-binary: 20 |
Goal | Return a text based object of the desired format |
Header name | x-fo-body-text |
Value syntax | { css | html | js | plain | indexhtml } |
Example | x-fo-body-text: css |
Goal | Return selected amount of log lines (the tail of the log file). You can use these log lines to check headers received by the flexible origin and some other information (let us know if you want to see any special information in the logs) |
Header name | x-fo-body-loglines |
Value syntax | { Number_of_log_lines } |
Example | x-fo-body-loglines: 10 |
Goal | When "true" the Flexible Origin will respect the path written in the URL. Make sure you uploaded an asset on that path before using this x-fo header. Default value is 'false' |
Header name | x-fo-body-path |
Value syntax | { true | false } |
Example | x-fo-body-path: true |
Goal | Add a header in the response from origin. You must define a different number for each header you are trying to set |
Header name | x-fo-header-add-{number} |
Value syntax | { header_name=header_value } |
Example | x-fo-header-add-1: Cache-Control=max-age=0s |
Goal | Modify a reponse header coming from the origin. You must define a different number for each header you are trying to modify. The 'Server' header can't be modified by the moment. Let us know if this is something you need |
Header name | x-fo-header-modify-{number} |
Value syntax | { header_name=header_new_value } |
Example | x-fo-header-modify-1: Content-Length=1000 |
Goal | Make the Flexible Origin delay its response by the amount of seconds you need |
Header name | x-fo-action-delay |
Value syntax | { time_in_seconds } |
Example | x-fo-action-delay: 15 |
Goal | This API allows the user to upload files to the Flexible Origin |
Endpoint | /x-fo/pushasset |
Method | POST |
Parameters | Query String: path=value (define the path where you´d like to place the asset, don´t use slash at the beginning of the path) |
Example | POST www.yourflexibleorigin.com/pushasset?path=your/path Attach the file in the body |
Upload Page | Instead of calling the push asset API you can also use an upload page that is part of each Flexible Origin instance. Just click here. |
Allowed methods | Flexible Origin allows the following methods: GET, POST, PUT, DELETE, OPTIONS, and HEAD |
Reserved paths | Flexible Origin reserves the following paths for internal processing: /static/* and /x-fo/*. |
Combined headers | All x-fo headers only work over a specific section of the response or over a specific action. This means you might need to combine more than one x-fo header to achieve a goal. For example, if you want to get an image that is displayed in your browser you might want to combine x-fo-body-image and also x-fo-header-add to include 'Content-Type: image/png'. This gives you A LOT of flexibility (that's why it's called Flexible Origin, duh!) |